I’m trying to create a report that uses the same value twice–once by itself and once as part of a larger list. The query seems to work OK with manually entered test criteria values. The single usage of the value comes from a table, and the list usage of the value comes from another query.
I’m trying to construct some VBA code that sorts on the single usage of the value:
‘Get single usage of value
PrimaryCR = Forms![CRSelect]!CorrCR.Value
‘Construct report filter that grabs list usage of value using single usage of value
RptFilter = “[Correction CRs Query].CorrCR='” & PrimaryCR & “‘”
‘Get report
DoCmd.OpenReport “AdHocCorrectionsListing — New”, acViewPreview, , RptFilter
When I run this code I get VB run-time error 3079 and the following message:
<>
I looked in the SQL code but that didn’t help any. I’m wondering if this is a problem with my VB syntax or a problem with the usage of the same value twice in a report.
Thanks,
Bob