Gasman
Enthusiastic Amateur
- Local time
- Today, 15:40
- Joined
- Sep 21, 2011
- Messages
- 14,465
Thank you Pat,
I believe I have that code in the OnCurrent event at present. I will move it to that other event.
I'll post all of the form code on Monday, as it is now, then correct everything after the responses.
I believe I have that code in the OnCurrent event at present. I will move it to that other event.
I'll post all of the form code on Monday, as it is now, then correct everything after the responses.
You have code that is causing the record to be saved. Please post the entire code module.
Also, I prefer to NOT dirty a record before the user does. This leads to confusion for the user. He thinks he just opened the form but didn't type anything and doesn't understand why he is getting a complaint about missing data. Or, even worse, you have no validation code and the empty (except for the FK) record just gets saved.
Use the BeforeInsert event to populate the foreign key. That event runs as soon as someone types the first character into ANY control. Once that happens, the user should recognize that HE dirtied the record and will not be confused by any missing data messages.