Specifically, I have two fields. Both are combo boxes (using tables as the row source).
What I want is that when empType combo box is set to Prehire (8 in the table) AND the empPosition combo box is set to Police Officer then the Police_MSK tab is visible. But if both of those conditions aren't met then I don't want that tab showing.
What might complicate this is that for all other Prehires (non Police Officer's) I have a different tab that I want to be visible called Prehire_MSK.
Here is what my code looks like:
Expand|Select|Wrap|Line Numbers
- Private Sub empType_AfterUpdate()
- If Me.empType = "8" Then
- Me.Prehire_MSK.Visible = True
- Else
- Me.Prehire_MSK.Visible = False
- End If
- If Me.empType = "8" And Me.empPosition = "Police Officer" Then
- Me.Police_MSK.Visible = True
- Else
- Me.Police_MSK.Visible = False
- End If
- End Sub
But it doesn't seem to be looking at the empPosition field and I can't get the Police_MSK tab to show up when it is a Prehire Police Officer. Can someone help me and tell me what's wrong with my code?
Am I better off using a Select Case instead of the If/Then/Else?
I hope I explained well enough what my problem is...
Thanks!