469,348 Members | 1,693 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,348 developers. It's quick & easy.

Record Navigating Event on a Tab Control Page

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
1 3037
MMcCarthy
14,534 Expert Mod 8TB
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.

Similar topics

10 posts views Thread by NH | last post: by
4 posts views Thread by AA Arens | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.