G
Guest
This message is a follow-up to a previous thread regarding the SQL syntax for
the CDate function. At the suggestion of Van Dinh, I now have the following
code for a between selection based on start and end dates entered on a form:
where = where & " AND [MAINT].[MAINT_PROD_DATE] BETWEEN " &
Format(Me!_[txtProdStartDate], "yyyy/mm/dd") & " AND " &
Format(Me!_[txtProdEndDate], "yyyy/mm/dd")
The problem I now having is that the code works properly for a given date
range but entering a range that should have no results will retrieve every
record that has a MAINT_PROD_DATE that is not null.
Any reasons why or suggestions on how to eliminate this problem?
the CDate function. At the suggestion of Van Dinh, I now have the following
code for a between selection based on start and end dates entered on a form:
where = where & " AND [MAINT].[MAINT_PROD_DATE] BETWEEN " &
Format(Me!_[txtProdStartDate], "yyyy/mm/dd") & " AND " &
Format(Me!_[txtProdEndDate], "yyyy/mm/dd")
The problem I now having is that the code works properly for a given date
range but entering a range that should have no results will retrieve every
record that has a MAINT_PROD_DATE that is not null.
Any reasons why or suggestions on how to eliminate this problem?