Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form_Activate occurring twice, losing focus

Status
Not open for further replies.

lorirobn

MIS
Mar 15, 2005
450
US
Hello,

I am working on a pop-up form which opens a data entry form after items are selected. The pop-up form is opened from my main switchboard form.

The sequence of events is:
--Switchboard
--OpenForm Pop-up
--OpenForm Data Entry form
--Close pop-up form

After I close my pop-up, the Switchboard's Form_Activate event is activated, not once but twice. Why does this happen, and why does this happen twice?

In addition, the Switchboard form displays in front of the Data Entry form. How can I get the focus back on my data entry form?

I know I could play around with it and get it to work, but I'd like to have an understanding of why this is happening.

Thanks in advance.

 
you could use some code for the pop-ups unload event.

Form_frmDataEntry.SetFocus

-Pete
 
Thank you Pete. I put the setfocus in, and it worked (had to put it in another event, though).

Lori
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top