G
Guest
I was trying to create a form to enter parameters for my query for a date
range. I followed all instructions and could not get my query to work or
recognize the dates in my form. I've gone through all the posts on this
matter, and nothing worked.
or
Between CDate([forms]![frmInpDateRange]![beginDate]) And
CDate([forms]![frmInpDateRange]![endDate])
or
Between CDate([Forms]![frmInpDateRange].[beginDate]) And
CDate([Forms]![frmInpDateRange].[endDate])
form is open and filled with valid dates
form referenced correctly
I specified parameter types
I tried CDate
I tried Format
etc..
I finally narrowed it down to the query itself. I forgot about the form and
just tried filtering with direct dates. I found that the query filters fine
if I put in direct dates.
But as soon as I introduce a parameter, in any way, either by a control on a
form, or by closing the form and having it prompt me to type in the values,
it fails.
Can't figure out rhyme or reason which dates show up. Sometimes NONE of the
dates that come through are between the criteria dates.
the field is a date/time field and contains both date and time, but as I
understand it, it interprets a straight date as 12 midnight of the same date.
HELP!
range. I followed all instructions and could not get my query to work or
recognize the dates in my form. I've gone through all the posts on this
matter, and nothing worked.
=[forms]![frmInpDateRange]![beginDate] And <=[forms]![frmInpDateRange]![endDate]
or
Between CDate([forms]![frmInpDateRange]![beginDate]) And
CDate([forms]![frmInpDateRange]![endDate])
or
Between CDate([Forms]![frmInpDateRange].[beginDate]) And
CDate([Forms]![frmInpDateRange].[endDate])
form is open and filled with valid dates
form referenced correctly
I specified parameter types
I tried CDate
I tried Format
etc..
I finally narrowed it down to the query itself. I forgot about the form and
just tried filtering with direct dates. I found that the query filters fine
if I put in direct dates.
Between #12/06/2006# And <#01/04/2007##12/06/2006# And <#01/04/2007#
But as soon as I introduce a parameter, in any way, either by a control on a
form, or by closing the form and having it prompt me to type in the values,
it fails.
Can't figure out rhyme or reason which dates show up. Sometimes NONE of the
dates that come through are between the criteria dates.
the field is a date/time field and contains both date and time, but as I
understand it, it interprets a straight date as 12 midnight of the same date.
HELP!