Date comparision does not work in VB 6

sha_agrawal's Avatar, Join Date: Jun 2007
Newbie Member
Please help me to sort out this problem. I am using vb6 with Ms-Access. I have a
table containing amount & date, I wrote following query to extract date wise list

"select date,amont from table1 where date =" & chr(35) & vardate & chr(35)

Vardate is a variable containing date type value
where am i wrong, Please guide me.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Try this

Code: VB
Sql = "select date,amont from table1 where date =#" & vardate & "#"