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

Brackets being put around Where in SQL line 1

Status
Not open for further replies.

TBOB

Technical User
Jun 22, 2002
65
US
I'm building an SQL string based on a selection from an option group. When I look at the string in VBA it looks like this: "SELECT RCLSITES.*FROM RCLSITES WHERE rcllink = ZNY". The query doesn't run, but asks for a parameter. When I look at the query something has added brackets around [ZNY]. If I strip off the brackets I get the desired result. Where do I need to look to correct this problem?

Thanks,

Tony
 
it thinks ZNY is a column

if you meant a string, you havbe to put quotes around it

... WHERE rcllink = 'ZNY'

rudy
SQL Consulting
 
r937,

That was it. Thanks.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top