By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Record Navigating Event on a Tab Control Page

P: 1
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In my database, however, I want to associate a particular numbered record of a field with each separate tab.

In exploring my options, it looks like the best way to do this is to add a record-navigating “On Click” event to each separate page of the tab control. The command button wizard will allow me to select the option of navigating to the first, last, next, or previous record – but not to a specific numbered record.

For grins, I have created a sample record navigation button – like GoToLastRecord. When I click on the Event Procedure in the button’s properties, it brings up a Visual Basic window with the underlying code for the button I just created. (As of now, I know very little about the Visual Basic language.)

My main question is either a) is there readily-accessible, existing code for navigating to a specific record X, or b) how would I modify the code generated for the button I made to make the database jump to a specific record X? Also, I need general instructions on how to locate the code file for the button I made; I presume I will need to store my “new” code file in the same place.

Thank you for any help you can offer!

John Osborn
Dept. of State Health Services
Austin, Texas
Oct 26 '06 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In my database, however, I want to associate a particular numbered record of a field with each separate tab.
if you put a control on the form rather than any specific tab page then it will be common to all tabs.


In exploring my options, it looks like the best way to do this is to add a record-navigating “On Click” event to each separate page of the tab control. The command button wizard will allow me to select the option of navigating to the first, last, next, or previous record – but not to a specific numbered record.
create a textbox on the form (not on a tab page) call it RecordNumber

Then create a command button on the form. When the wizard opens just close it.

Now right click on the command button and select properties

When the properties window opens:

In the format tab

Beside Caption put in something simple like 'Go to Record'

In the Event tab

go to the On Click event and enter the following code

Expand|Select|Wrap|Line Numbers
  1.  
  2. DoCmd.GoToRecord acDataForm, "FormName", acGoTo, Me.RecordNumber
  3.  
  4.  


Also, I need general instructions on how to locate the code file for the button I made; I presume I will need to store my “new” code file in the same place.
see above
Oct 28 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.