I am simply wanting to select records from an Access DB called 'notes' via VB6. The DB 'notes' has a table called 'notes' which has a field called 'caldate' with a data type 'date'.
I have declared the following date variable in VB:
Public caldatevar As Date
I believe Access stores dates in the format 12/30/2000, so assume I will provide the date in that format eg today:
caldatevar = #2/6/2000#
I am then having problems with my select statement. I have tried the following each with their resultant error:
"SELECT * FROM [notes] where caldate = caldatevar"
=>too few parameters
"SELECT * FROM [notes] where caldate = '" & caldatevar & "'"
=>data type missmatch
"SELECT * FROM [notes] where caldate = #2/6/2000#"
Can you put me right?