I have been trying to figure this out all day. Here is my situation.
I have a Form that loads giving users several options. They select one and that opens the data entry form which has several fields such as formid, current date, user name, etc. All these fields are autopopulated... but they need to be editable. Since the defaults are normally correct, I have the form do a setfocus onto the first subform control where the real data entry occurs. The form and subform are tied by a 1 to many relationship based on formID.
The problem is that when the setfocus shifts the cursor, it does NOT save the defaults values in the parent to the table, so when a user finishes data entry in the subform it returns and error that "a related record is required" in the parent table. I'm wondering how i can force access to save the parent form before the user tries to save the subform? I have tried tons of save commands, but none will save the defaults unless there is a physical click or selection of something on the parent form. Then it will save.
Anyone have a way to force access to immediately create the record when the form is opened?
Thanks
I have a Form that loads giving users several options. They select one and that opens the data entry form which has several fields such as formid, current date, user name, etc. All these fields are autopopulated... but they need to be editable. Since the defaults are normally correct, I have the form do a setfocus onto the first subform control where the real data entry occurs. The form and subform are tied by a 1 to many relationship based on formID.
The problem is that when the setfocus shifts the cursor, it does NOT save the defaults values in the parent to the table, so when a user finishes data entry in the subform it returns and error that "a related record is required" in the parent table. I'm wondering how i can force access to save the parent form before the user tries to save the subform? I have tried tons of save commands, but none will save the defaults unless there is a physical click or selection of something on the parent form. Then it will save.
Anyone have a way to force access to immediately create the record when the form is opened?
Thanks