Requery subform on form open - not working (1 Viewer)

mbentley

Registered User.
Local time
Today, 04:04
Joined
Feb 1, 2002
Messages
138
I'm running some code from the main form's OnOpen event that alters the record source of a subform. I requery the subform at the end of the subroutine, but the changes are not shown until I close and reopen the form. It appears that the requery is not working. Is there a trick to this? :confused:
 
Last edited:
R

Rich

Guest
Since the subForm "Opens" before the main form you can't use any of the main form load open events to do this.
You could use the Timer event or the button that's opening the form in the first place
 

mbentley

Registered User.
Local time
Today, 04:04
Joined
Feb 1, 2002
Messages
138
Thanks. I feared as much. I'll just tag the code onto something that happens before the form loads, as you've suggested (I had been hoping to avoid that due to the chance of it getting missed if I allow more than one access point to the form.)
 
R

Rich

Guest
You could hide the subForm and force users to click a button to display it with the different RecordSource
 

Users who are viewing this thread

Top Bottom