How do I get the on click event to work on a TAB Form. As a test I entered msgbox("Something"). but when I click the tab I don't get the message. Looking at some E.E questions & answers, "On Change event" is mentioned but I can't find. I am working on access 2003 at the moment. Any help most appreciated
chestera
Microsoft Access
Last Comment
chestera
8/22/2022 - Mon
savic7uk
Hi try this where TabCtl0 your tabcontrol name
Private Sub TabCtl0_Change()If Me.TabCtl0.Value = 0 Then 'First Page 'Do code for Page 1ElseIf Me.TabCtl0.Value = 1 Then 'Second page 'Do code for Page 2ElseIf Me.TabCtl0.Value = 2 Then 'Third page 'Do code for Page 3End IfEnd Sub
Private Sub TabCtl0_Change() Select Case TabCtl0 Case 0 'First Page 'Code for Page 1 Case 1 'Second page 'Code for Page 2 Case 2 'Third page 'Code for Page 3 End SelectEnd Sub
I am looking at 2003 and I don't have the change event. But I can work it out from here many thanks for your help
Alan
chestera
ASKER
savic7uk
I have closed this question so hope you don't mind asking another question. I have a copy of access 2013 even in this version Tab/Property there are Click, Doubleclick, Mouseup and mouse down events can't find the Change event
Alan
chestera
ASKER
savic7uk
I have finally worked it out. Use the form change Change event not the tab.
With the rest of you info it's working. Once again thank you for your help
Open in new window
Or with case
Open in new window