Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Help

Status
Not open for further replies.

whjwilson

Technical User
Jan 20, 2006
23
0
0
US
I am trying to set up a button to print report that is currently open, this is what I have set for the click command code:

DoCmd.OpenReport "Weapons Cards", acViewNormal, , "Name = " & Forms!Main!Name

Whenever I click the button to print I get an error:

syntax error (missing operator)in query expression '(Name = William Wilson'

 
DoCmd.OpenReport "Weapons Cards", acViewNormal, , "Name = [tt]'" & Forms!Main!Name & "'"[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top