Command buttons for Access 2003

Tiffanyc83

New member
Local time
Today, 02:06
Joined
Mar 15, 2013
Messages
2
Hi, I am making a database for some people I work with, I'm having trouble with making a button to work. I want a button to go to the next tab on the tab control, but still in the same record. I prefer not to use the vba, but if I need to use it, please give me directions on how to do it. Thank you.:)
 
Welcome to the forum.

I'm not sure if you could do this without using VBA.

To move up through your tabs you would need the following code in the On Click event of a button;
Code:
Dim intPgIndx As Integer


On Error GoTo ErrorHandler

    intPgIndx = Me.YourTabCntrlName.Pages(Me.TabCtl10).PageIndex
    
    Me.YourTabCntrlName.Pages(intPgIndx + 1).SetFocus
    
    Exit Sub
    
ErrorHandler:
    MsgBox "You are on the last tab"
    
    Exit Sub

And to move back down through the tab;
Code:
Dim intPgIndx As Integer


On Error GoTo ErrorHandler

    intPgIndx = Me.YourTabCntrlName.Pages(Me.TabCtl10).PageIndex
    
    Me.YourTabCntrlName.Pages(intPgIndx 1 1).SetFocus
    
    Exit Sub
    
ErrorHandler:
    MsgBox "You are on the first tab"
    
    Exit Sub
 
isn't it as easy to click the tab header, as to have a button?

on an individual tab, you can just click the tab button to tab between controls on the tab.
 
The OP wants the Command Button to go to the next Page and remain on the same Record; perhaps he wants to use the native Tab to simply move between the Pages when staying on the same Record is not necessary...or perhaps not! :D Who knows?

Of course, if this Tabbed Page has a true Subform on it, i.e. one that is linked using the Link Master Fields/Link Child Fields, it should already be on the same Record. We probably need to know about that, too. :)

Linq ;0)>
 
The OP wants the Command Button to go to the next Page and remain on the same Record; perhaps he wants to use the native Tab to simply move between the Pages when staying on the same Record is not necessary...or perhaps not! :D Who knows?

Of course, if this Tabbed Page has a true Subform on it, i.e. one that is linked using the Link Master Fields/Link Child Fields, it should already be on the same Record. We probably need to know about that, too. :)

Linq ;0)>

I have a similar problem where the radiobutton I insert on my form, when 1 option is selected, the selection becomes the same for the rest of the other pages that I currently have. How do I make it such that when user select, it is only for that particular page on the form? :confused:
 
I have a similar problem where the radiobutton I insert on my form, when 1 option is selected, the selection becomes the same for the rest of the other pages that I currently have. How do I make it such that when user select, it is only for that particular page on the form? :confused:

Sound's as if your option group is unbound. Try binding it to the underlying table.
 
...I have a similar problem where the radiobutton I insert on my form, when 1 option is selected, the selection becomes the same for the rest of the other pages that I currently have...
I'm sure that John is correct, but exactly how is your problem 'similar' to that of the OP's in this thread?

If you have a question we'll be happy to help you, that's why we're here, but please take the time to start your own thread, don't hijack someone else's with a totally unrelated question.

Linq ;0)>
 
I have subforms that link the master and child together. But to my question about a button to go to next tab page on the same record, has not worked. I tried John's way, but its not working for me...it comes back as an error...soooo, I'm probably gonna have to change tabs the normal way, by pressing the tabs at the top.....in the end, it might become an inconvenience, because the form is long.
I would need to alert the person inputting data, that they need to go to the next tab, because I have been testing it, and the record goes to a new record, when i need it to go to the next tab.

I wonder if I made this too complicated
 

Users who are viewing this thread

Back
Top Bottom