Select Statement (from earlier post)

D

DJ

Attempting to get this syntax correct:
Alex sent an earlier reply, but it produced an error
also. Would someone else take a look at this.
Thanks

strSQL = "SELECT count(*) As MyCount FROM Registration
where Field48 = " & Me.Barcode_Number And "Field49 = '" &
IR & " '"

I am attempting to use the two pieces of info on a form
(1) a integer field on a form and (2) a string value on
the form. But, this damn syntax is killing me. Can
someone help in getting this statement syntax correct.
Would appreciate it.
 
A

Alex Dybenko

if Me.Barcode_Number - number and IR (prpbably me.IR) - string then:

strSQL = "SELECT count(*) As MyCount FROM Registration where Field48 = " &
Me.Barcode_Number & " And Field49 = """" & IR & """"
 
A

Alex Dybenko

"""" is 4 times "

Alex Dybenko said:
if Me.Barcode_Number - number and IR (prpbably me.IR) - string then:

strSQL = "SELECT count(*) As MyCount FROM Registration where Field48 = " &
Me.Barcode_Number & " And Field49 = """" & IR & """"
 
T

TC

Change:

.... & Me.Barcode_Number And "Field49 = ...

to:

.... & Me.Barcode_Number & " And Field49 = ...

Note the space after the "

HTH,
TC
 

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