DoCmd.OpenReport - TechRepublic
General discussion
October 16, 2001 at 11:36 AM
stanap

DoCmd.OpenReport

by stanap . Updated 24 years, 8 months ago

I am using the DoCmd.OpenReport command as illustrated below:
strSSN = Me.SSN
stDocName = “PerfPlan”

strSQL = “SSN = ‘” & strSSN & “‘”
DoCmd.OpenReport stDocName, acNormal, , “SSN = ‘” & strSSN & “‘”

But I get the following error: “The command or action ‘OpenReport’ isn’t available now.”

If I change the acNormal to acPreview the report displays OK and I can print from there.

How can I get the report(s) to print without having to preview them first.

Thanks,
Stan

This discussion is locked

All Comments