putting a field of type date in a criterium

odrap

Registered User.
Local time
Tomorrow, 00:05
Joined
Dec 16, 2008
Messages
156
I know when a date as e.g 15/09/09 must be enterd in a criterium, the date must be surrounded by #.
But how do you write a string criterium that reference a field , e.g. "Periode" , that must contains a datevalue = equal the contents of a variable of type date
e.g. dim datum as date
 
Not following you. Should be the same syntax.

Dim datum as date
datum = #12/25/2008# (Christmas)
 
Maybe what you mean is this (again, just use pound signs).
Dim SQL as string
SQL = "Select * from orders where OrderDate= #" & datum & "#"
 

Users who are viewing this thread

Back
Top Bottom