Filtering / Conditional Formatting Forms

I am using two date pickers as filters for a range of dates
The dates listed in the form are conditionally formatted in colours
When i select the range of dates using the date pickers i have two problems....

1. I need to press tab or return after using the date picker to register the date (i don't want to do this).
2. I need to click back on the date picker text box for the conditional formats to update (i don't want to do this).

Any simple ways to solve this?
Who is Participating?
Jeffrey CoachmanMIS LiasonCommented:
<My understanding is that a report can only be generated from tables or queries not from forms, is that correct?>

Yes, but via code, you can set the RecordSource for the Report to be the same as the Form.
You can do this by dumping the .filter code and build the Recordsource for the form in code.

Or use the same raw recordsource for both the Form and the report, ...and simply pass your Form Filters to the Report.

Or do this the stansdard way, and have a "Filter Form".
This form will only have your filtering (Date) controls. (No recordsource)
Then put a button on this form to open either a filtered Form Or Report, based on the filtering selections in this Form.
Code *Roughly* similar to this:
Docmd.OpenForm "YourFormName",,,"YourDate Between " & "#" & txtStartDate & "#" & " AND " &  "#" & txtEndDate & "#"
This will open the Form based on your date selections in this "Filtering Form"

But this is all about "Filtering...
Your original Question was about "Conditional Formatting".
So I am a bit confused about the exact nature of the question?

Since you did not post any of your code, it is difficult to know what is causing your troubles...

Using the standard technique that I outlined above...once you clicked a date in each date picker, the date would go into the corresponding control automatically.

Then you would simply click the the "View Form", or "View Report" button to view the filtered  (and conditionally formatted) Report/Form. will open.

So Research all of this and post back with your findings and/or clarifications on this Question.

What version of Access- and therefore, which datepicker- built-in or ActiveX or what?
SweetingAAuthor Commented:
Access 2007 - built in
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jeffrey CoachmanMIS LiasonCommented:
Does this have to be done dynamically in a form?

You can use a report fired from a form and all your issues go away...
SweetingAAuthor Commented:
I like the idea but i always though reports can only be triggered from queries and tables?
Jeffrey CoachmanMIS LiasonCommented:
It seems that we have a Terminology issue here...

I never used the word "Trigger"
You can "Fire" (open via code) a report from a form.

So Clicking a button with this code:
Docmd.OpenReport "YourReport", acViewPreview"
..Will "Fire" the Report

What you are considering "Triggering" is really the "Recordsource"
A Report can have a "RecordSource" of a Table, Query, or SQL

This all being said, where do we stand with this issue?


SweetingAAuthor Commented:
The problem Jeff is that i want to filter the form which i have done with some drop downs but then what i really want is a report of the final form after it has been filtered.

My understanding is that a report can only be generated from tables or queries not from forms, is that correct?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.