simple syntax question

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.
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top