G
Guest
I am having the follwing issue:
I allow a user to enter a starting date on a form that dynamically generates
the SQL code behind it.
Dates in the DB are stored as strings in the format "yyyy/mm/dd", so I need
to convert them to date using CDate.
I have tried every version of syntax I can think of to make the SQL
statement to generate correctly with no luck. I'm hoping another set of eyes
will see the probably obvious issue with this code. The code generates error
2001 "You cancelled the previous operation" which most likley indicates an
SQL syntax issue.
where = where & " AND "
+ "(Format(Cdate([MAINT].[MAINT_TEST_DATE]), 'yyyy/mm/dd'))"
+ " >= #"
+ (Me![txtTestStartDate])
+ " #"
I allow a user to enter a starting date on a form that dynamically generates
the SQL code behind it.
Dates in the DB are stored as strings in the format "yyyy/mm/dd", so I need
to convert them to date using CDate.
I have tried every version of syntax I can think of to make the SQL
statement to generate correctly with no luck. I'm hoping another set of eyes
will see the probably obvious issue with this code. The code generates error
2001 "You cancelled the previous operation" which most likley indicates an
SQL syntax issue.
where = where & " AND "
+ "(Format(Cdate([MAINT].[MAINT_TEST_DATE]), 'yyyy/mm/dd'))"
+ " >= #"
+ (Me![txtTestStartDate])
+ " #"