T
tgavin
I want to open a report and pull up specific data based on fields in the
form. I do this all the time but in this case, I need the link criteria to
have 2 criteria. When I pull for either one separately, it works fine but
when I do it for both of them, I get a Type Mismatch error message. The code
I am using is:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptTimeSheet"
stLinkCriteria = "[PayWeek]=" & "#" & Me![PayWeek] & "#" And "[RCCode]="
& "'" & Me![RCCode] & "'"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Could you help?
Thanks
form. I do this all the time but in this case, I need the link criteria to
have 2 criteria. When I pull for either one separately, it works fine but
when I do it for both of them, I get a Type Mismatch error message. The code
I am using is:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptTimeSheet"
stLinkCriteria = "[PayWeek]=" & "#" & Me![PayWeek] & "#" And "[RCCode]="
& "'" & Me![RCCode] & "'"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Could you help?
Thanks