I currently have a VB statement written for a pop up form based on a main form. I would like to change it so it is based off of a subform and somehow tie those tables together. I'm not sure how that would work seeing as I'd have to go back and match up everything since July when I modified the databse to include the data.
This is the code I am currently working with:
I would like to base it off of Me.Status (the name of the field in a subform based off of a completely different table (tblEmpRating)) and would like to pop up if any one of these terms in the combo box is used "New Hire", "Rehire", "Transfer".
So I changed the VB statement to read:
Now it is telling me I have a complile or GoTo error. Am I wording it wrong? Thank you for the help!!
This is the code I am currently working with:
Code:
Private Sub EmploymentStatus_AfterUpdate()
If Me.EmploymentStatus = "Active" Then
Me.tblEmpInfo.Visible = True
Else
Me.tblEmpInfo.Visible = False
End If
End Sub
Private Sub Form_Current()
If Me.NewRecord Then
Me.tblEmpInfo.Visible = True
Else
If Me.EmploymentStatus = "Active" Then
Me.tblEmpInfo.Visible = True
Else
Me.tblEmpInfo.Visible = False
End If
End If
I would like to base it off of Me.Status (the name of the field in a subform based off of a completely different table (tblEmpRating)) and would like to pop up if any one of these terms in the combo box is used "New Hire", "Rehire", "Transfer".
So I changed the VB statement to read:
Code:
Private Sub Status_AfterUpdate()
If Me.Status = "New Hire", "Rehire", "Transfer" Then
Me.tblEmpInfo.Visible = True
Else
Me.tblEmpInfo.Visible = False
End If
End Sub
Private Sub Form_Current()
If Me.NewRecord Then
Me.tblEmpInfo.Visible = True
Else
If Me.Status = "New Hire", "Rehire", "Transfer" Then
Me.tblEmpInfo.Visible = True
Else
Me.tblEmpInfo.Visible = False
End If
End If