I am trying to use a drop down menu list for users to select the type of training that they want to review information about. I am using the following code on a button called 'Preview':
When I use this, I get an error message that says... "Data Type Mismatch in Criteria Expression"
I have used this code elsewhere with no problem, but can't get it to work here.
Any ideas?
Harry Jessen
HMJessen@Yahoo.com
Code:
Private Sub Preview_Click()
On Error GoTo Err_Preview_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Synopsis"
stLinkCriteria = "[Class_Title]='" & Me![Combo2] & "'"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Exit_Preview_Click:
Exit Sub
Err_Preview_Click:
MsgBox Err.Description
Resume Exit_Preview_Click
End Sub
I have used this code elsewhere with no problem, but can't get it to work here.
Any ideas?
Harry Jessen
HMJessen@Yahoo.com