PDA

Click to See Complete Forum and Search --> : ADO & SQL Date Search


gilly
Jun 12th, 2000, 10:25 PM
I am setting an ADO control's recordset in runtime and I want to display the records "SELECT....WHERE DateField = DateVariable"

DateVariable is input by the user into a text box and then converted from text to date;

DateField is defined as Data Type Date/Time in an Access Database.

But when I run the form, a message box 'ado Unknown' comes up.

What am I doing wrong?

Jimmer
Jun 12th, 2000, 10:44 PM
I don't know if this will help but I think you just need
to put the right syntax around the data variable.
Like This:

"SELECT....WHERE DateField = #" & DateVariable & "#"

Hope this helps.