nschroeder
nschroeder
- Local time
- Today, 07:14
- Joined
- Jan 8, 2007
- Messages
- 186
I have two forms, EA (a Continuous form) and EADetail (a Single form). They're not a form/subform, but they sit side-by-side, and the EA_Current event synchronizes EADetail so it shows detail information for the selected record in EA. They both have the same base query recordsource, but EADetail pulls in data from other tables as well.
The EA form shows tasks assigned to users, which they "Complete" by clicking a button that fills in their username and the current date. The Complete button includes code, which I just added, to verify that a FAX number has been entered on EADetail. Initially, this didn't work because if they entered a value in EADetail.FAX, then directly clicked Complete, the EA form didn't recognize the FAX value because the entry was still dirty, so it looked like it was still null. The workaround is to click somewhere else in EADetail first, then click Complete, but I would like to avoid the extra step.
To resolve this, I added Forms!EADetail.Refresh to the Complete button code, but that causes runtime error 7878 when it tries to update the username and date values because the record data is no longer current. Adding Me.Requery might fix that problem, but I don't want to do that because it would reset the current record on the EA form to the first record and scroll to the top, causing much confusion.
If there was a way to obtain the dirty EADetail.FAX number value from code in the EA form, I could then verify that a value was entered before it was actually updated. Is there a way to do that, or are there any other suggestions?
Thanks.
The EA form shows tasks assigned to users, which they "Complete" by clicking a button that fills in their username and the current date. The Complete button includes code, which I just added, to verify that a FAX number has been entered on EADetail. Initially, this didn't work because if they entered a value in EADetail.FAX, then directly clicked Complete, the EA form didn't recognize the FAX value because the entry was still dirty, so it looked like it was still null. The workaround is to click somewhere else in EADetail first, then click Complete, but I would like to avoid the extra step.
To resolve this, I added Forms!EADetail.Refresh to the Complete button code, but that causes runtime error 7878 when it tries to update the username and date values because the record data is no longer current. Adding Me.Requery might fix that problem, but I don't want to do that because it would reset the current record on the EA form to the first record and scroll to the top, causing much confusion.
If there was a way to obtain the dirty EADetail.FAX number value from code in the EA form, I could then verify that a value was entered before it was actually updated. Is there a way to do that, or are there any other suggestions?
Thanks.