Advertisement

08.07.2008 at 09:36AM PDT, ID: 23630036
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Dynamically modify form fields using VBA based on form user-input

Asked by bkapla1 in Access Reports, Access Forms, Access Coding/Macros

Tags: ,

I am attempting to reuse a basic report by dynamically modifying it using user inputted values from a form.
This eliminates the need to create multiple reports that vary only slightly for a single column.

I have a form that asks the user which report type to run (using radiobuttons).  The user selects a report type and then clicks a button to open the report.

The report layout will be exactly the same for all report types EXCEPT the "type" column will vary based on their form selection.

The report layout has columns for FiscalYear, AdviceNumber, AdviceDate, [ColumnX]...
ColumnX is the column that will change based on the form input and will be an AdviceType (e.g. MandI, TribalEquipment,  Replacement, etc.) containing a dollar value.

I have the logic built so that the form button runs VBA to add data to a temporary table.  It 1st deletes all data from the table and then inserts the data appropriately based on the user selection (e.g. if they select Replacement as the type, then only replacement data is added to the table (even though the table has columns for the other types, but they are just set to 0).

Then, the Reports recordsouce points to this temporary table so it never needs to change.

The Dilemma...
I need to be able to to dynamically change the Label.name And textbox.datasource based on the user selection.

I tried the report's OnOpen event to do this, but I got an error saying this can only be changed in Design view.

Any suggesstions??
Start Free Trial
[+][-]08.07.2008 at 10:56AM PDT, ID: 22183511

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Reports, Access Forms, Access Coding/Macros
Tags: MS Access VBA, MS Access 2003
Sign Up Now!
Solution Provided By: bkapla1
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628