G
Guest
Hello,
I created a table-based form that contains records and a button that opens a
query-based report that filters based on one criteria.
However, what I would like to do is to incude multiple criterias. I typed
the following code, but I keep getting "Type Mismatch". Can one use more
than one criteria when using StLinkCriteria os should I use a different
approach? Please see code below:
Private Sub Print_Slip_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "GT_Grant_Route_Trans"
stLinkCriteria = ("[Grant_Number]=" & "'" & Me![Grant_Number] & "'") And
("[Appl_Recvd_Date]=" & "'" & Me![Appl_Recvd_Date] & "'") And
("[Act_Type_Num]=" & "'" & Me![Act_Type_Num] & "'")
"
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
End Sub
Thank you in advance for your help
I created a table-based form that contains records and a button that opens a
query-based report that filters based on one criteria.
However, what I would like to do is to incude multiple criterias. I typed
the following code, but I keep getting "Type Mismatch". Can one use more
than one criteria when using StLinkCriteria os should I use a different
approach? Please see code below:
Private Sub Print_Slip_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "GT_Grant_Route_Trans"
stLinkCriteria = ("[Grant_Number]=" & "'" & Me![Grant_Number] & "'") And
("[Appl_Recvd_Date]=" & "'" & Me![Appl_Recvd_Date] & "'") And
("[Act_Type_Num]=" & "'" & Me![Act_Type_Num] & "'")
"
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
End Sub
Thank you in advance for your help