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!

simple sql syntax

Status
Not open for further replies.

shopwise

Technical User
Sep 22, 2008
52
0
0
US
My Asp recordset contains the following SQL code:

Recordset5.Source = Recordset5.Source & " WHERE ManufacturerPartNumber IN (" & Replace(varPartNumber,"|", ", ") & ") AND (Query1.CustomText04="3") "

An error message is generated as follows:
Expected end of statement

Recordset5.Source = Recordset5.Source & " WHERE ManufacturerPartNumber IN (" & Replace(varPartNumber,"|", ", ") & ") AND (Query1.CustomText04="3") "
-----------------------------------------------------------------------------------------------------------------------------------------------^

What is the proper syntax (marks or symbols to be used) for the text: (Query1.CustomText04="3")

Please note that the CustomText04 field is a text field even though it contains a number as the value.
 
this should work:
Recordset5.source = Recordset5.source & " WHERE ManufacturerPartNumber IN (" &
Replace(varPartNumber,"|", ", ") & ") AND (Query1.CustomText04='3') "

tested it with msgbox - no errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top