Problem saving record

Eljefegeneo

Still trying to learn
Local time
Yesterday, 20:44
Joined
Jan 10, 2011
Messages
902
[FONT=&quot]I am having trouble saving a record. I have a main form [frmMain] with two subforms [sub1] and [sub2] on different tabs. Each subform can bring up the same popup form [frmNotes] where I enter new notes or modify the old notes entry for a client. The problem arises is that when I close [frmNotes], it doesn't populate either subform until I leave the record. I have tried:[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]1.[/FONT][FONT=&quot] [/FONT][FONT=&quot]1. Saving the record upon close of the popup form with DoCmd.Save, either on [frmNotes]'s OnClose event, or by using a command button for close. [/FONT][FONT=&quot]2. Using "If Me.Dirty then Me.Dirty = False", likewise as above.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]The only thing that seems to work is to save the record on [frmNotes] using the OnChange event for the [notes] field. When I close [frmNotes], the new text or data appears in both the subforms on the main form.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I am not trying to over think this as I usually do, but why doesn't either of the first two methods work? [/FONT]
 
Perhaps the sub forms just need to be re-querried when frmNotes is closed. If the code you use to open the form were to open it as a modal form, then code execution would stop at that line until the form is closed, so the command to re-query the sub form could follow the code that opens the notes form.
 
Thank you!
 

Users who are viewing this thread

Back
Top Bottom