Discussion Locked

Access 2000 Tab Controls On a Form

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have created a form and have applied the tab control. I built a macro to open 2nd (different) form. Then on the "on click" event procedure in the properties of the second tab I instruct it to open the macro which opens the 2nd form. And it won't work. So. Anyone have any suggestions/advice?

3 replies

by mark.thomson

What you are doing will work if you select your 2nd tab and then click on some grey space in the working area of the tab. If you want to open your second form as soon as the correct tab is clicked then add the following code snippet to the "On Change" event of your Tab Control

If Me.TabCtl0.Value = _
Me.TabCtl0.Pages("page2").PageIndex Then
DoCmd.OpenForm FormName:="form2"
End If

replace TabClt0 with the name of your tab control, page2 with the name of the required tab & form2 with the name of the required form

This discussion is closed to new replies.