Hey all.
I've got a parameter query that feeds a report.
I'd like to call the report in code and feed it the parameter. I thought the following code would do it, but I still get the parameter prompt [Enter Vendor Number]. Any suggestions?
PB
Text0.SetFocus
myVendorNum = CInt(Text0.Text)
stDocName = "myReport"
stcondition = "[Enter Vendor Number]=" & myVendorNum <==number field
DoCmd.OpenReport stDocName, acViewPreview, , stcondition
I've got a parameter query that feeds a report.
I'd like to call the report in code and feed it the parameter. I thought the following code would do it, but I still get the parameter prompt [Enter Vendor Number]. Any suggestions?
PB
Text0.SetFocus
myVendorNum = CInt(Text0.Text)
stDocName = "myReport"
stcondition = "[Enter Vendor Number]=" & myVendorNum <==number field
DoCmd.OpenReport stDocName, acViewPreview, , stcondition