Calling a report from a form, record ID not passing

brharrii

Registered User.
Local time
Today, 06:10
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
 
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

Back
Top Bottom