Georges Heinesch wrote:
Hi.
Why is this DAO line producing error 3077 (Syntax error in number in
expression)?
rst.FindFirst "ValidFrom = " & DateValue(varDate)
rst is a defined recordset
varDate is a valid date.
ValidFrom is a valid field of the underlying table.
This line works!
rst.FindFirst "ValidFrom = #01,01,2000#"
You need to delimit the date returned by DateValue(). It returns
a Variant (of subtype Date) so try this:
rst.FindFirst "ValidFrom = #" & DateValue(varDate) & "#"
But if varDate is a valid Date field then all you need to do is:
rst.FindFirst "ValidFrom = #" & varDate & "#"
--
'-------------------------------
' John Mishefske
'-------------------------------