Calling a report from a form, record ID not passing (1 Viewer)

brharrii

Registered User.
Local time
Today, 14:57
Joined
May 15, 2012
Messages
272
I am using an on-click event on my form to call up a report for the current record. It has been a while since I've used the form to call the report, but I always remember it working correctly. Today when I try to call up the report, it opens but no record is being pulled up so the report pulls up blank. Any thoughts?

Thanks

Code:
    DoCmd.OpenReport "rptSupplierInformation", acViewPreview, , "[OperationID]=" & [cboMoveTo], acWindowNormal
 

burrina

Registered User.
Local time
Today, 16:57
Joined
May 10, 2014
Messages
972
Have you verified the data is there? You can try this, however, normally you use corresponding ID's.

Dim strReportName As String
Dim strCriteria As String

strReportName = "rptSupplierInformation"
strCriteria = "[OperationID] = " & Me![cboMoveTo]
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria


HTH
 

Users who are viewing this thread

Top Bottom