Populating Calling form with data

dsmaj

Registered User.
Local time
Today, 01:15
Joined
Apr 28, 2004
Messages
96
I've currently got this working by using the Form_Activate event, however I don't like this method, because it kind of seems dirty... :D I've got a Form with a listbox on it, and a command button right under the listbox...when the user presses the command button it opens another form where the user enters/modifies some data in another table...when the user "Save"'s and closes that form, I want the form with the listbox/command button to automatically update the listbox with the data that the user entered in the other form. Would it be best to just put an apropriate query in the rowsource for that listbox? Or can I use some kind of event to update it apropriately? As mentioned, I don't really like the Form_Activate solution, because it's updating the listbox sometimes when it doesn't need to.

EDIT: Specifically, I'm looking for some kind of On_Return_From_Event or something...


Thanks,
Sam
 
DoCmd.RunCommand acCmdSaveRecord
Forms!YouForm!YourListBox.Requery

in the unload event of the form
 
Rich said:
DoCmd.RunCommand acCmdSaveRecord
Forms!YouForm!YourListBox.Requery

in the unload event of the form

Hey, thanks for the reply Rich...I was hoping for something I could do FROM the actual form that the listboxes are on...any ideas?

Thanks,
Sam
 
I've never found the Activate event to be reliable, I wouldn't recommend it :(
 

Users who are viewing this thread

Back
Top Bottom