Need Help Writing First Action Command Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a form I have created, I have two tabs. I would like to create a button
on the second tab that will take to first tab on the same record.

I tried to use the wizard for this but with no luck,

Any Advice would be well received.
 
Not sure I understand what you mean by "the same record", but the way to
change the tab page from one to another in terms of which is showing is to
set the value of the Tab control to the page that you want. The tab on far
left would be 1, next tab is 2, etc.

Private Sub CommandButtonName_Click()
' this makes the first tab page the visible one
Me.TabControlName.Value = 1
End Sub
 
Forgot that this is a macros group, so you would use a macro similar to this
to do what you want:

MacroName
Action: SetValue
Item: TabControlName
Expression: 1

Attach this macro to the On Click property of the command button in the
Properties window.
 
Back
Top