04-11-12, 12:06 #1Registered User
- Join Date
- Jun 2010
Unanswered: Requery after data in entered in subform field
I have built a Customer/Invoices/Payments database that keeps track of company profit
I have a mainform with a single record subform to enter data into a table and another subform to view data from a query.
This subform entry will effect the data in the query once it is entered , so what I would like to do is enter the data, save and requery to have the other subform's query update with the new information before I close the mainform
I need to be able to see the change in that query before I leave
The last field to enter is a number field - what event can I use to tell access that I'm finished with my entry, save and requery all the under lying tables and queries?
Any help/suggestion is greatly appreciated!
04-11-12, 14:01 #2Registered User
- Join Date
- Jan 2012
Can you guarantee that the user will enter and exit the controls in a definite order? If you can then you could run your code from the AfterUpdate event of the 'number field' control.
The attached file has one table with one field, one form bound to this table and one listbox that displays data from a query based on this table. You can enter a value in this text box and then click the 'Save' then 'Requery' command buttons. The listbox will then update.
One thing to note is that if you are referencing a control on a sub form you must reference it through the main form, i.e. forms!mainformname!subformname!controlname rather than forms!mainformname!controlnameHope this helps,
Access 2000 User