SQL Syntax Problem

  • Thread starter Thread starter pc_user
  • Start date Start date
P

pc_user

I'm not getting the right syntax and I need help. gstrDate is a global
variable.
=================================
strSQL = gstrDate & " Between #" & Me.BeginningDate & "# And #" &
Me.EndingDate & "# And "
strSQL = gstrDate & " Between " & Me.BeginningDate & " And " &
Me.EndingDate & " And "
=================================
Thanks,
PC
 
Try that
strSQL = "(" & gstrDate & " Between #" & Me.BeginningDate & "# And #" &
Me.EndingDate & "#) And ("
strSQL = gstrDate & " Between #" & Me.BeginningDate & "# And #" &
Me.EndingDate & "#)"
 

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

Similar Threads

Building A Filter 3
Update query issue 0
export to CSV file 1
SQL Syntax Error - UPDATE command 1
SQL VBA -- INNER JOIN Syntax 6
Using DDL to Create Constraint - Syntax Error 4
SQL Error Help 7
SQL Error 2

Back
Top