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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error - missing operator for OpenReport

Status
Not open for further replies.

buskgrim

IS-IT--Management
Jul 31, 2002
3
GB
DoCmd.OpenReport "R:Test Report", , , "School =" & MyField

The above reults in "Syntax Error (3075) missing Operator in query expression"

The field variable is correctly picking up the values I want but the OpenReport method refuses to run (I am simply attempting to cycle through a dataset and print a report for each record).

Any help gratefully received!

Thanks

Chris
 
Are you sure MyField is numeric? If it's text, enclose it between single quotes:

DoCmd.OpenReport "R:Test Report", , , "School ='" & MyField & "'"

HTH,

Dan
 
Dan,

OpenReport problem solved.

Much Appreciated.

Chris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top