Hi,
I inserted a preview button based on two forms. I want to view the person's reenrollment selection. Check this code out, I get an mismatch type error. Any suggestions.
On Error GoTo Err_Command36_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Enrollment (Below 170K)" And "SESP Enrollment (Above 170K)"
stLinkCriteria = "[EmpID]=" & Me![EmpID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command36_Click:
Exit Sub
Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click
I inserted a preview button based on two forms. I want to view the person's reenrollment selection. Check this code out, I get an mismatch type error. Any suggestions.
On Error GoTo Err_Command36_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Enrollment (Below 170K)" And "SESP Enrollment (Above 170K)"
stLinkCriteria = "[EmpID]=" & Me![EmpID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command36_Click:
Exit Sub
Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click