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

Calling a report with a value. 1

Status
Not open for further replies.

ncopeland

IS-IT--Management
Mar 12, 2002
88
GB
Hi

I have the following line which is attached to a button on a form. I have a combo box for selecting a supplier which I move it into a text box.

DoCmd.OpenReport "SupplierPriceList", acPreview, , "[POHeader].[Supplier-Name]=" & Me![Supp]


I get the following error.

Run-time Error '3075'

Syntax error in query expresssion '([POHeader].[Supplier-Name]=ALL FIT)'.

ALL FIT being the supplier name passed from the text box.

Any suggestions greatly received.

KR

NC.
 
[Supplier-Name] seems be a text field, therefore you need quotes around it. Try changing it to this:

DoCmd.OpenReport "SupplierPriceList", acPreview, , "[POHeader].[Supplier-Name]= '" & Me![Supp] & "'"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top