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

moving between subforms

Status
Not open for further replies.

hoose

Technical User
Jun 5, 2003
43
CA
hi

i have two subforms on a form (they are on different tabs)

the user fills out information on the first subform, click on a button 'next' and moves ot the second to fill out more info.

I have a button 'previous' on the second subform that i want to bring the user back to the first subform.

the code in the 'next' button is

docmd.GoToControl "PartBSubform"

and this works

the code in the 'previous' button is

docmd.GoToControl "PartASubForm"

and it doesn't work. A message saying "Cannot set focus to control PartASubForm appears

I just converted the database to access 2002. Before it was access 97 and it worked.

Does anyone know what i am doing wrong?

Thanks

dan
 
nevermind,

in access 2002 when you move back to the first subform it automatically sets the focus to the control that last had the focus.

and in my case that control had a got focus event that set the focus to the second subform.

bah. i'm a moron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top