|
-
Oct 13th, 1999, 06:39 PM
#1
Thread Starter
Addicted Member
I tried to make an SQL statement that seached a DB for a single Date but I recived allways an error message for invalid data type. This means I tried this:
Set rst = dbs.OpenRecordset("SELECT * FROM DBaes WHERE date =" & Var_Today)
Where: "DBase" was my database
"date" the field on the database with Date/Time data type
"Var_Today" a variable with today date for comparison (I tried it as Variant, Date and String data type) all of them gave me error.
-
Oct 13th, 1999, 09:29 PM
#2
Guru
Try this:
"Select * from MyTable where TheDateField = #" & MyStringOrDateVariable & "#"
HTH
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|