I am having a weird problem with my dates
i am using vb6 and Access 2002
i am trying to pass a simple sql query to fill a data control (ado)
if i pass it this string
AdodcPro.RecordSource = "SELECT tblControlRec.GRecID, tblControlRec.ProDate, tblControlRec.CapDate " _
& " From tblControlRec " _
& " WHERE (((tblControlRec.CapDate)=#" & Date & "#));"
It returns Nothing
However if i create the qry in access it works when i cut and paste into vb
SELECT tblControlRec.GRecID, tblControlRec.ProDate, tblControlRec.CapDate
Also access is swopping my Day and Month around and it is driving me nuts
i typed into the query in access 09-12-2002, when i view the sql statement access builds, it swops the date around, how can i get round this
my CapDate fld is a date field set to short date, i have tried using the format property in the access table and it does not help
it shows my records in my grid which is connected to the data control
I am using a date picker for the user to select a date and then a comand button which refreshes my datacontrol and then the gris according to the date the user has selected
any ideas ?