simple syntax question

  • Thread starter Thread starter Susan
  • Start date Start date
S

Susan

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.
 
On Tue, 16 Jun 2009 20:22:01 -0700, Susan

Doublequote is a string terminator in VBScript. Use a singlequote
instead:
Query1.CustomText04='3'

-Tom.
Microsoft Access MVP
 
Back
Top