date range question for todays date

  • Thread starter gmazza via AccessMonster.com
  • Start date
G

gmazza via AccessMonster.com

Hi there,
I have a button on my parameter form that is called Today, so when I click it,
todays date gets filled in the datefrom text box, as well as the DateTo box.
I have buttons for the week, month and year as well. They all work.
However, when I insert a record in my table for today, I click Today and
nothing shows up. If I click the Week, Month or Year button the record shows
on the report.
Under my Today button I have the following code:
Me!txtdatefrom = Date
Me!txtDateTo = Date

So my record in the table looks like this:
2009-04-27 05:22:12 PM

and my datefrom and DateTo on my parameter form look like this:
2009-04-27

Note: The record in my table has a datatype of text.
My Report has a recordsource of a query that has an Expression field that
looks like this:
Under Field: Expr1: CDate([ErrDate])
Under the criteria for this field:
=[forms]![ErrorLogDateParam]![txtDateFrom] And <=[forms]![ErrorLogDateParam]![txtDateTo]

Keep in mind that it works for the Week, Month and Year, just not the day.
Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top