Connecting Tech Pros Worldwide Help | Site Map

Form Tabs-Stop User

DD
Guest
 
Posts: n/a
#1: Nov 12 '05
I have x2 tab forms place in a mainform.

with the following code..
I want to stop the user going to Case 2 when case 1 has no EmployeeID


Dim sf As Control
For Each sf In Me.Controls
If sf.ControlType = acSubform Then sf.Visible = False
Next
Select Case ActiveControl
Case 1
Me.Employee.Visible = True
Case 2
Me.fsubEmployeePersonal.Visible = True
Case Else
End Select
Me.MainTab = ActiveControl - 1
Exit Sub
Closed Thread