Hi,
I am trying to select records from a record set based on a date.
When the date, 01/01/2010, is hard coded in the select statement, it works.
rst.LockType = adLockOptimistic
rst.Open "select * from signals where signals.datedaily > #1/1/2010#", CurrentProject.Connection
if i use a variable , it won't execute. What am I doing wrong?
dataentry_fromdate = #1/1/2010#
rst.LockType = adLockOptimistic
rst.Open "select * from signals where signals.datedaily > dataentry_fromdate", CurrentProject.Connection
I am trying to select records from a record set based on a date.
When the date, 01/01/2010, is hard coded in the select statement, it works.
rst.LockType = adLockOptimistic
rst.Open "select * from signals where signals.datedaily > #1/1/2010#", CurrentProject.Connection
if i use a variable , it won't execute. What am I doing wrong?
dataentry_fromdate = #1/1/2010#
rst.LockType = adLockOptimistic
rst.Open "select * from signals where signals.datedaily > dataentry_fromdate", CurrentProject.Connection