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!

Opening more than 1 form problem!

Status
Not open for further replies.

emumaster

Programmer
Aug 30, 2001
31
US
I have a form open and after a user presses a button, I have the code:

DoCmd.Openform "TicketEntry"
exit sub

My problem is that even though the form is on top of my first form, I can't seem to get any code (like form_open code) to work. I specifically have a Me!firstticket.setfocus
which I have tried in form_load and form_open and the focus on the field never happens. I can click on the form into that field but the focus command doesn't seem to work.
I have tried putting putting in a debugging point in the form_open or load but it never seems to hit it. It's like the focus is back on form 1 that called this form.
I have even tried putting the setfocus line right after the open form command and then it tells me that it doesn't know the field I'm trying to set the focus to.

Anyone have any idea's??
 
Are you really an Emu Master? :) hehe ... anyways...

I've found that you cannot use the 'Me' keyword right away...especially in Access 97 (which yes,
unfortunately, I'm still using :( ).

My solution around the problem is to specifically reference the control using Forms! <formname> ! <control name>

HTH

Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top