
Need help with Select statement syntax to retrieve Access2000 record between two dates
Samuel
Enclose the date value in # sign and try
"SELECT * FROM tbl_Invoice WHERE InvDate BETWEEN #" & dt_date1 & "# AND #"
& dt_date2 & "#"
Sukesh
Quote:
> Hi all,
> I'm using ADO 2.6, VB6 and Access2000.
> I needed to retrieve record from the Access2000 table between two dates.
> Can anyone help me with the proper Select statement syntax.
> I use the following statement and not able to get it to work.
> "SELECT * FROM tbl_Invoice WHERE InvDate BETWEEN '" & dt_date1 & '"
AND
> '" & dt_date2 & "'"
> Thanks in advance!
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003