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!

Event on Tab Control 1

Status
Not open for further replies.

Rmcta

Technical User
Nov 1, 2002
478
US
I have created a form with tab controls.
One tab is to browse records the other one I wish to use to Add records. On the on-click event of the tab I inserted:
DoCmd.GoToRecord , , acNewRec
but it does not do anything. Why?
How do I get a new record when the user click on the "Add Record" tab?

 
Make sure the focus is on the tab and not the form itself. Usually when it will not go to a new record it is because the focus is in the wrong place. JL
 
You don't want to put it in the OnClick event, use the OnChange event of the tab control. That should fix your problem.
 
Thanks Fancy. I have been having headaches over Tab Controls and Focus for the last two days, so your answer helped me also. Pink star to ya, JL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top