Maintain Focus On Subfrm
Jun 8, 2005
I am having trouble keeping focus on a field in a subfrm when I click the next button for the next record.
I have a frmQuiz. This shows the quiz question. I have a subfrmUserAnswers, where the user enters the Answer ID in the field UserAnswerID. This form clears to a new record when the Next button is pressed for the next question and the focus is lost.
How can I maintain the focus?
View Replies
ADVERTISEMENT
Oct 11, 2007
Hello,
I attached a db to better display what I'm attempting to do. How can I get fld1 in subfrm1 (which is in column view) to display the same data in subfrm2 (which is in tabular view)? --
so if I click on the text displaying "dog" in subfrm1, subfrm2 displays "dog" row. If I click on "cat", subfrm2 displays "cat" row?
View 8 Replies
View Related
Aug 24, 2006
I have a form that has names with a subform with information. The contacts are in a list box and the subform (in datasheet view) shows the phone number/email/etc.. of the selected contact person. I am using the form as a quick look up of a persons information. Before changing it to a list box, it was previously a combo box, and everything worked fine. i was able to requery the subform and the cooresponding info for the person would come up. However, its now a list box and i am having problems with the code to make this happen. I have a different button sending the names selected from the list box to a report...and that works fine, but i am obvisouly missing something to make it work with the subfrm requery. Below is the code i got so far. Any help would greatly be appreciated. its driving me nuts!
Private Sub QuickLookup_Click()
Dim varItem As Variant
Dim strWhere As String
strWhere = "[memberID] = "
For Each varItem In Me.MemberID.ItemsSelected
strWhere = strWhere & Me.MemberID.ItemData(varItem) & " OR [memberID] = "
Next varItem
strWhere = Left(strWhere, Len(strWhere) - 17)
DoCmd.Requery "subfrmqryindividual"
View 2 Replies
View Related
Sep 30, 2006
Hi,
Haven't used the 'ondirty' property before and am having trouble with it.
I have a main form (PersAction) with a subform (PersAction_PersData). After Insert button is click, subform appears ready for new data. click save works great. I wish to have an undo button on the main form become visible once data is entered into the subform. I've tried the following code in both the main form and subform 'Ondirty' property as an event and no luck:
If Me!PersAction_PersData.Dirty Then
Me!cmdUndo.Enabled = True ' Enable button.
Else
Me!cmdUndo.Enabled = False ' Disable button.
End If
Any help would be appreciated
thanks in advance
Hawg1
View 3 Replies
View Related
Aug 18, 2006
How do i make my subfrm record source switch to another saved query (qryPendingStatus) when it's opened from the form.
Heres what i am trying to accomplish:
I have a subfrm that i'd like to use to display info in 2 different forms.
There's a form currently for All statuses. Then another new one for Pending status. I'd like to use the same subform for this pending status form also, and in doing that my qryAllStatuses, but change to qryPendingStatus on the subfrm when i open the mainfrom.
This is on the open even ofthe mainform, but does not work (says method not founds...so obviouly i can't use ".Recordsource" here:
Private Sub Form_Open(Cancel As Integer)
Me.subfrmJobInfo.RecordSource = "qryPendingStatus"
End Sub
How can i make this happen?
View 3 Replies
View Related
Oct 22, 2004
Hello All Dears .
And Request From The Experts.
i want Help to Maintain the Tables.
Please if you Can Give Me the Example what i want i will be greatly Thankful.
i want to maintain
1.Sale
2.Purchase
3.Journal Ledger
4.Trial Balance
5.Balance Sheet.
6.Stock Report
For this Puropose i am at the time using following Tables
1.Customers
Including Debtors and Creditors And Also in that Table i have a Cash In Hand Accounts Bank Accounts,Assesst Account
Mean Head Account.
2.Products Names Including all Products With Description and Rates
3.Orders similar like northwind.I Maintain Sale and Purchase Tran in 3,4 Tables.
4.OrdersDetails Similar Like Northwind.
5.Trans in this table i maintain all Transiction.For All Accounts
6.Nar For Text Purpose include all Description which can use in Transiction
i want to know i am going in right Direction.
Any Suggestion will be very Helpfull For Me.
Waiting Somone Help
View 1 Replies
View Related
Mar 27, 2008
I have a value in a form that has code behind it to calculate a value for that field when that field is "clicked." All works as it should. However, if I go to look at a previous record in the form, and click on that cell, it calculates a new value, when it should maintain the value that is already there.
Is there a way to "lock" in the values on a record so if a user goes back to look, the value cannot be changed?
View 2 Replies
View Related
Sep 11, 2005
My friends, please help me figure this out. I am new to MS-ACCESS. I am trying to create a simple Leave system for my office. When a user requests a leave, the number of hours will be added to a table. I have created a form for this purpose. What I would then like to happen is, the next field in the Table is the sum of hours requested thus far. So that field would be Requested + Total requested Thus far. I can do it easily in Excel but I can't figure out how to do that in ACCESS. It is a very simple database and I can mail you my sample if you are interested. Thanks in advance.
yallah.
aliyallah@yahoo.com
View 2 Replies
View Related
Mar 9, 2006
I have used the docmd.restore when closing a maximized report to keep the form from maximizing... but when I view a data sheet from my form then close the data sheet my form is maximized! Any help out there??:(
View 3 Replies
View Related
Feb 16, 2008
I have created a table for customer bills, and a table for customer profiles which contains rates associated with them specifically. The problem is that after a new rate change has been imposed I want to be able to look at an old bill, via a report, and have it reflect the "old" rate within proper historical context. I'm looking for suggestions on how to best manage ongoing rate changes while maintaining a billing rate history in my reports?
View 6 Replies
View Related
Sep 7, 2014
I have 6 machines that run jobs Monday thru Friday but I will focus on doing one machine to avoid confusion.
The machine will be running 23 hours a day Monday thru Thursday and 18 hours on Friday and is shut down on Saturday and Sunday. Monday morning at 5am (start of the work week) Job A starts. The job will run for 30 hours. Then Job B will run for 160 hours. I need to know when Job B will start and end. Although it would be nice to know the time of day, just knowing the date would be good enough.
As I said I have 6 machines and each one is running anywhere from 7 to 10 jobs. My end result could be nothing more than a report, but a datasheet form would be ideal. On Mondays, new jobs are added and schedule is updated based on actual productivity from the prior week.
View 3 Replies
View Related
Nov 16, 2006
Is there any way to force the switchboard to maintain its pop up window size? Whenever I open an item from it that is maximised and then return to the switchboard it too has maximised.
Thanks
Russell
View 4 Replies
View Related
Apr 9, 2013
Is there a way of keeping/setting the primary key when using a make table query?
View 2 Replies
View Related
Jul 11, 2013
I have this code:
Public Sub cmdRequery_Click()
Dim vFlag As String
vFlag = Me![EncounterNbr]
Me.Requery
With Me.Recordset
.FindFirst "[EncounterNbr] = '" & vFlag & "'"
Me.Bookmark = .Bookmark
End With
The user starts on a continous form and opens a record, makes some changes, and then when that form closes it triggers this public sub.
The code does what I want it to do in that it returns to the last encounter number that was selected (now on the continous form again) and it requeries and shows anything that was changed about the record on the form that was closed before requery.......
But it always resorts and moves it and I want it to stay in the same spot unless the user sorts. Is there any way to make that happen?
View 9 Replies
View Related
Jun 3, 2013
How to properly use 3 cascading combo boxes.
I have them set up and they work, to some degree.
I have three boxes Type/Sub-Type/Item. They all filter down to the next one, the problem is, when I get to the 3rd box, it filters ONLY from the 2nd box and loses the filter from the 1st. What do I need to do to get it to maintain the filter from the first box and then ADD the filter from the second box when populating the 3rd box?
View 2 Replies
View Related
Feb 17, 2013
i have a production database in which i have different sections processing on the same product. i have a daily production entry form on which datewise entry is done for each section.
i want to maintain the total stock of each section (sectionB) with productName, input from sectionA , production from sectionB, balance (input-production) . presently i used query for this .. but i need a stock table in which entries should be inserted by an automatic query .. how should i achieve this :
1. by an append query who runs every time to append the quantity when a daily entry is made .??
2. by an update query to replace the quantity with a qty from totals query ?
i.e. what is the best method to maintain inventory from input & output tables ?
View 3 Replies
View Related
Jul 31, 2013
I'm not sure if Access is the right program to use for this scenario as I only know the basics on creating the database.
I want to be able to create a client database and then be able to generate a number of standard template letters at any particular time for selected clients.
I don't want a mail merge!!
Can access be used for this?
Ideally I would like to create a form for administrators to use to input new client info and update existing clients info and then just be able to click a button (or the like) to generate the standardized letter for a particular scenario.
View 1 Replies
View Related
Jun 15, 2014
I have a button that when clicked moves a piece of data to a subform. I have put the whole sequence below. The trouble I am having is :
- The event will not happen until the form is saved. I think this is because fkTaskID is a new record (auto) number which hasn't generated yet.
- If I force the form to save it does work but then I get an error on the INSERT command when not all required fields of the form are complete (see sample in second part below).
Is there a way to save the record and maintain the integrity of the form input - and still have this code work?
BUTTON CODE
==========
Private Sub BTNAddReasonRw_Click()
Dim dIndex As Long
DoCmd.SetWarnings False
For dIndex = 0 To Me.LISTReworkReasonsUnselected.ListCount - 1
[Code] ......
View 1 Replies
View Related
Mar 24, 2005
I have several forms and subforms that display data, but are not used for data entry. The first textbox on every form gets the focus on open. I'm sure I've seen some way to open the form with no focus on any control!
Can someone help me remember?
Thanks,
Sup
View 3 Replies
View Related
Apr 15, 2005
thanks for helping.
how do i get a record to get focus when a form opens or a button is clicked on?
thanks again
View 2 Replies
View Related
Jan 9, 2006
I am having trouble getting the cursor to change focus after updating a field in my tab control subforms. I have a main form with a tab control and 4 related subforms for each record in the main form.
I have a calendar that pops up with the On Click of my Date field. When the date is selected, it enters it into the field and the calendar closes. For some reason though the user cannot simply go to the next record with the mouse and has to tab to or select another field in the same record first and then click on the Date field in the next record.
I have tried SetFocus to "Hours" (the next field after "Date")and "NextRecord" on every Event I can think of but it does nothing, it just stays on the changed field and the only way to get out of it is to go to another field. I've tried saving, requery, etc. I've also tried the options shown in the forum with no luck and using different events associated with the Calendar form - On Close, Lost Focus, etc.
Any suggestions? Thanks
View 6 Replies
View Related
Nov 9, 2006
I have a form that has 9 tab pages. I have an amend button in the form footer that will do a different thing depending on which tab has the focus. How can I find out which tab has got the focus when I click the Amend button?
View 2 Replies
View Related
Nov 30, 2006
Hi
I have a problem with setting focus to a text box. There is a listview on the form. Double clicking on a row will search the database for that record using SNo field and then display the contents on the respective control. When I click on a row the first time, it works. Clicking on the second row immediately gives the error "error 2110 - Access cannot set focus to the control txtReference.
Here is the code.......
Private Sub lvwOrders_DblClick()
ClearAll
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM tblOrderEntry where sno=" & ListView.SelectedItem, con, adOpenKeyset, adLockPessimistic
lblFooter.Caption = "Edit Record"
subRetrieve
End Sub
Private Sub subRetrieve()
Form_OrderEntry.SetFocus
With rs
For i = 0 To lstCostCenter.ListCount - 1
If lstCostCenter.ItemData(i) = !CostCenter Then
lstCostCenter.Selected(i) = True
Exit For
End If
Next i
txtReference.SetFocus
txtReference.Text = !ReferenceNo
txtOrderNumber.SetFocus
txtOrderNumber.Text = !OrderNo
For i = 0 To lstCostCenter.ListCount - 1
If lstCostCenter.ItemData(i) = !CostCenter Then
lstCostCenter.Selected(i) = True
Exit For
End If
Next i
For i = 0 To lstDescription.ListCount - 1
If lstDescription.ItemData(i) = !Description Then
lstDescription.Selected(i) = True
Exit For
End If
Next i
For i = 0 To lstOrderStatus.ListCount - 1
If lstOrderStatus.ItemData(i) = !OrderStatus Then
lstOrderStatus.Selected(i) = True
Exit For
End If
Next i
For i = 0 To lstSalesRep.ListCount - 1
If lstSalesRep.ItemData(i) = !SalesRep Then
lstSalesRep.Selected(i) = True
Exit For
End If
Next i
For i = 0 To lstPaymentMethod.ListCount - 1
If lstPaymentMethod.ItemData(i) = !PaymentMethod Then
lstPaymentMethod.Selected(i) = True
Exit For
End If
Next i
For i = 0 To lstCallType.ListCount - 1
If lstCallType.ItemData(i) = !TypeofCall Then
lstCallType.Selected(i) = True
Exit For
End If
Next i
For i = 0 To lstStatus.ListCount - 1
If lstStatus.ItemData(i) = !Status Then
lstStatus.Selected(i) = True
Exit For
End If
Next i
If !Status = "Pending" Then
txtReasons.Visible = True
lstAssign_Reasons.Visible = False
txtReasons.SetFocus
txtReasons.Text = !Reason
ElseIf !Status = "Assign" Then
lstAssign_Reasons.Visible = True
cmdSave.SetFocus
txtReasons.Visible = False
For i = 0 To lstAssign_Reasons.ListCount - 1
If lstAssign_Reasons.ItemData(i) = !Reason Then
lstAssign_Reasons.Selected(i) = True
Exit For
End If
Next i
End If
End With
End Sub
What can be going wrong ?
View 3 Replies
View Related
Apr 11, 2008
Hi everyone,
how would i go about setting focus on a tab control? i have a tab control on a form with 6 tab pages. i am on page 4 ( bank ) and i have a button to add a bank account. this opens up the add form and i add the account. i then requery the form and the tab goes back to page 1. how do i set the focus back to the previous opened tab?
many thanks,
Nigel
View 2 Replies
View Related
Jan 28, 2005
I have a form, and when it opens it has focus on a box i dont want it to focus on
How do i change which box it has focus on when it is opened?
View 3 Replies
View Related
Feb 22, 2005
I have two buttons on a form, one of them adds default information to three boxes, the other clears the info. I want to be able to hide one o the buttons depending on what is in the box.
I know I need to change the focus away from the control in order to hide it, but how do I do it please?
I have this so far, but there is something missing!
Private Sub Command744_Click()
Me.BdeRec40kMarksmanship = Null
Me.BdeRec40kFireStatus = Null
Me.BdeRec40kOpening_Range = Null
Me.Command743.Visible = True
Me.command777.Visible = False
End Sub
View 2 Replies
View Related