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?
SweetingAAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peter57rCommented:
What version of Access- and therefore, which datepicker- built-in or ActiveX or what?
0
SweetingAAuthor Commented:
Access 2007 - built in
0
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...
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

SweetingAAuthor Commented:
I like the idea but i always though reports can only be triggered from queries and tables?
0
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?

JeffCoachnman


0
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?
0
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.

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.