Need help with Select statement syntax to retrieve Access2000 record between two dates 
Author Message
 Need help with Select statement syntax to retrieve Access2000 record between two dates

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!



Sun, 31 Jul 2005 08:03:43 GMT  
 Need help with Select statement syntax to retrieve Access2000 record between two dates


Fri, 19 Jun 1992 00:00:00 GMT  
 Need help with Select statement syntax to retrieve Access2000 record between two dates


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


Sun, 31 Jul 2005 10:05:07 GMT  
 Need help with Select statement syntax to retrieve Access2000 record between two dates


Fri, 19 Jun 1992 00:00:00 GMT  
 Need help with Select statement syntax to retrieve Access2000 record between two dates

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 & "'"

Enclose the date values with pound sign (#) characters instead of single quotes in order to identify
them as date values.


Microsoft MVP (Visual Basic)



Sun, 31 Jul 2005 21:44:27 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Need help with Select statement syntax to retrieve Access2000 record between two dates

2. IF then statement with two control arrays, need syntax help

3. syntax of SQL statement needs help

4. Need help with syntax of INSERT INTO statement

5. How to select the current record only with SELECT statement

6. select record 1 to n on access2000

7. SELECT Statement Syntax

8. Need help with Select, Where, Or statement

9. Need Help in Retrieving a Specific Record

10. Need help counting number of records retrieved from an Access file

11. Need help retrieving records that are dated closest to today VB4

12. How to retrieve 2 select statements from one Stored Procedure

 

 
Powered by phpBB® Forum Software