do not save incorrect data input

lamha

Registered User.
Local time
Today, 02:36
Joined
Jun 21, 2000
Messages
76
I have a form and a subform. After the user choose a name and a date (using calendar control)in the main form, he needs to click refresh command button before filling any data in the subform. I have a combo box in the subform, and its list won't change unless the user clicking refresh.
What if the user forgets to click refresh and go in the subform to fill in data. The item he chooses might not be the correct one for that person and that date(I have a time range set up). My problem is this incorrect item is still saved into the table. How do you make it not saved into the table?
 
lamha, have you tried using me.refesh in the after update of the main form so that after they have entered the details it will automaticaly refresh.
 
You need to requery the combo box on whatever even would result in that list changing. The code would look like:

me.[Combobox1].requery if on the same form as the event

or to fully reference it if combo box is on the main form:

Forms![MainFormName]![Combobox1].requery

if combo box is on a subform:

Forms![MainFormName]![SubformCONTROLName].Form![ComboBox1].requery

Note that it is the subform control's name not the name of the subform that is the source object for the subform control
 

Users who are viewing this thread

Back
Top Bottom