[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 128
  • Last Modified:

SQL - Between ... AND

I have a SQL query that queries and Access 2000 database for the records between a particular period  The declarations are as follows

txtdate1 as textbox
txtdate2 as text box

ADODC.recordsource = " Select * from Sale where Hdate between " & txtdate1.text  & " AND " & txtdate2.text

ADODC.refresh

The result of the query does not alter the recordsource.  I think there is something wrong with query

Tks in advance

Ivanc
0
ivanc
Asked:
ivanc
1 Solution
 
deightonCommented:
try this

ADODC.recordsource = " Select * from Sale where Hdate between #" &
                    trim(txtdate1.text)  & "# AND #" & trim(txtdate2.text) & "#"
0
 
ivancAuthor Commented:
Tks for your prompt answer
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now