Form pages

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

Guest

Is there a way to trigger an event (such as setting a textbox value) by
merely selecting a page on a multiple page form?
 
How do you mean a page? A record or a form? If it's form, then just have an on form load command.
 
What I mean is: If while working in a multi-tab (page) form, and the user
merely selects a certain tab (page), then some text box on that page would
get set to a value. Hope that makes it clearer.
 
The tab will contain a value (the tab number). Set it so when the value of the tab is the required tab number then the event occurs. E.g.
tab1 = value 1, etc
So if tab1.value = 1 then....

Samantha Rawson
 
Sure

Private Sub tab1_Change()
If tab1.value = 1 Then
txt1.value = 1
End If
End Sub

Sets the value of txt1 to 1 when the second tab (Page2) is selected in tab1.
The tab index is zero based.

Ron W
 
Hi Ron; I copied your code and changed it as follows to match my tab number
and text box name, however it did not set the text box value. Am I doing
something wrong?

Private Sub tab1_Change()
If tab1.Value = 7 Then
Me.txtChkd.Value = 1
End If
End Sub
 
Back
Top