Date range query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the follwing syntax, and it's not working on the date selection
criteria. Any ideas what I'm doing wrong?

Thanks!

recSet2.Open "SELECT * from [Service Provider Rate Detail] where [Rate
Effective Start Date] <= " & ws_service_date_from & " and " & _
"[Rate Effective End Date] >= " & ws_service_date_from
 
Dates require the # delimiter:

recSet2.Open "SELECT * from [Service Provider Rate Detail] "_
& " where [Rate Effective Start Date] <= #" & ws_service_date_from & "#"
_
& " and [Rate Effective End Date] >= #" & ws_service_date_from "#"

HTH,
Debbie


|I have the follwing syntax, and it's not working on the date selection
| criteria. Any ideas what I'm doing wrong?
|
| Thanks!
|
| recSet2.Open "SELECT * from [Service Provider Rate Detail] where [Rate
| Effective Start Date] <= " & ws_service_date_from & " and " & _
| "[Rate Effective End Date] >= " & ws_service_date_from
 

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

Back
Top