judyscofield
Programmer
I'm trying to open a recordset in VB against a SQL Server Database. The criteria field is a datetime field in the table. I'm testing with two records, one with a date of 12/20/2002 and the other 1/10/2003.
A date is entered in a maskedit box on a form. If I enter the value 01/01/2003 as the date to use in the select statement. I should get a recordset with 1 record, but I keep getting both records.
rsvisits.open "select * from jovisit " & _
"where jovdate > " & cdate(mskvdate.text) & _
" order by jovdate"
I also want a similar statement using two dates and between, but I then get no records returned.
Am I coding this wrong?
Thanks
Judy Scofield
A date is entered in a maskedit box on a form. If I enter the value 01/01/2003 as the date to use in the select statement. I should get a recordset with 1 record, but I keep getting both records.
rsvisits.open "select * from jovisit " & _
"where jovdate > " & cdate(mskvdate.text) & _
" order by jovdate"
I also want a similar statement using two dates and between, but I then get no records returned.
Am I coding this wrong?
Thanks
Judy Scofield