Question Opening two forms together

josephbupe

Registered User.
Local time
Today, 06:54
Joined
Jan 31, 2008
Messages
247
Hi,

I have the OpenForm command in the main form that automatically opens second form when opened. However, the second form appears to open before the main form opens. I also tried to use the On time event but the flickering on the second form at a timer interval of 1000 is disturbing.

How best can i do this?

joseph
 
It's all down to which event you use to load it. No length of pause will help if the code is being run before the first form opens.

Some events fire before the main form is opened, some after.

For example the text in the status bar says that "on open" runs before the form is loaded whereas "on load" happens after the form loads.
 
try opening the second form in the current event of thyer main form, rather than in the open or load event.

you may need to add a test to see if it is already open, to avoid re-opening the form, although I am not sure whether that would cause any effect (ie opening a form that is already open). of course, your main form may not actually call the current event more than once.
 
Hi Gemmar,

I tried in the on current event, but the second form did not open:

DoCmd.OpenForm "F_Wanted_Persons_Images"
 
Why not just open 2 forms when the first is being open.

Rather than opening 1 form then have that form immediately open a second, have the command button which opens the first form open the second one too.
 

Users who are viewing this thread

Back
Top Bottom