Conditional formatting for dates is not working

S

sam

I am trying to generate reports by date range but conditional
formatting for dates doesnt seem to work. Can anyone help me with this.

Thanks in advance,
Sam.
 
R

Rick B

If you explain in detail what you entered for your conditional formatting,
what some sample values are, and what format you are seeing when you do so.

Details please.
 
S

sam

I have for field Date: Expression is DateDiff("m",[Date-1],[Date2]),
Where Date-1 and Date2 are inputs on report run.
Actually i want for input date gives the report for that month.
I tried using 'between' too, but it not working.

I think this might help you to solve it.
Thanks,
 
R

Rick B

Okay, this is not conditional formatting. You are trying to limit the
records that display based on an entered date range, right?

If so, go to your query and under the date field, put in something like...

Between [Enter Start Date] and [Enter Stop Date]
 
S

sam

Thanks for quick reply but i dont understand how should i write a query
as i need two inputs in that ...
Can you please guide me with that...
Actually i m new to access n working first time on reports..

I really appreciate your help.
Thanks,
Sam.
 
R

Rick B

Open your report in design view.

Open the properties box and locate the "data" tab. The first item there (I
think) is "record source" and there should be a builder button to the right
[...].

Click it.

It will open the "query" that is used to pull records to the report.

One of the fields in that query is the date field from your table.

Under that field in the "Criteria:" put the following...

Between [Enter Start Date] and [Enter Stop Date]


Then close the query and close the report. Make sure to save the changes to
both.

When you run the report it will prompt you to enter the start and stop dates
and will use that to select the records that pull to your report.
 

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