Forcing a Form to update on field change

GregoryWest

Registered User.
Local time
Today, 15:37
Joined
Apr 13, 2014
Messages
161
I have a form with several fields and a subform.



What I am trying to do is write some VBA code so that when any one of the first three fields is changed:
A) VBA code will update a field of one of the open tables,
B) Access will re-query the forms data source query,
C) Access will refresh the form with the new data.


I have all the code I need, where I am having problems is the collisions between the open form, and the VBA code updating the same table and the refresh of the form itself.


Has anyone ever created a form like this?


example


Account# Name: Address:

When the user puts in a new account number, the name and address are updates to the new account number information, and able to be edited....
 
Not clear what data you are entering. Are you entering a new order for a new customer and you want to create the customer account record 'on-the-fly' while entering the order record?

One approach is to type/select customer via a combobox. If customer does not exist, code in the combobox NotInList event will open Customer form for input of new record and refresh the combobox list.
 

Users who are viewing this thread

Back
Top Bottom