mbentley
08-19-2004, 12:30 PM
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:
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
08-19-2004, 01:57 PM
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.)
You could hide the subForm and force users to click a button to display it with the different RecordSource