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!

Select control on another page of tab control

Status
Not open for further replies.

DrSmyth

Technical User
Jul 16, 2003
557
GB
Got a tricky problem. When i change a record on one subform (thats on one page of a tab control) i want to got to a field in another subform that's on a different page of the tab control...

I've tried this code to activate the new control:
Code:
Forms![frm_thinksmart]!TabCtl36.Value = 1
Forms![frm_thinksmart]![Tbl_Comments subform].Form![CommentText].SetFocus
but i get a runtime error message (2115). the event has been added to the beforeupdate event in the field being updated. frm_Thinksmart is my main form, Tbl_Comments subform is the subform and Tabctl36 is the tabcontrol.

i've also tried just the set focus line but this appears to do nothing..

Can anybody help?

thanks
 
Save the current record before going to another subform.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
hi, i've added in
Code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
but i'm now getting another error message telling me that the function st before update is preventing me from saving...
 
Cheers...

Seems to work now, it was going to the wrong control on the right page... Changed the Tab index and it now seems to be working as intended... Thanks for the help chaps..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top