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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change focus to different form

Status
Not open for further replies.

Zelandakh

MIS
Joined
Mar 12, 1999
Messages
12,173
Location
GB
I was trying to be clever - but I'm not clever enough...

Database is set to open frmStart. This form has an onload property set to:

DoCmd.Minimize
DoCmd.OpenForm DLookup("sMenu", "tblUsersAndGroups", "sUser='" & fOSUserName & "'")

(I've cut out the error checking). This opens a form based on the Windows 2000 username. Downside is that the frmStart has the focus, not the next form specified in the openform above.

How can I change the focus?
 
You could try a few different things:

1) close out the frmstart on the onopen of the dlookup form.

2) try to implicitly set the focus such as: forms![myformname].setfocus or maybe me.setfocus

3) open the dlookup form modal or as a dialog


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top