Passing Query Parameters to a Report

WillM

Registered User.
Local time
Today, 14:55
Joined
Jan 1, 2014
Messages
83
Hello all!

I have a navigation form that will have 6-8 tabs. We were using about that many databases, but we are finally consolidating them into one. The result of us using so many databases has been the multitude of forms and reports that were necessary for each database prior to merging them together.

The problem: There will be anywhere from 12-20 (text boxes) that the user can use to search anything in our database. What we need to have happen, if possible, is for those search parameters to show up in the header of our report if they have text in them. If the text box is blank, it should not show up in the header of the report.

I have read how to to do the start/end date technique, but I do not know if that would work for what we are doing since the boxes would only show up if they are populated by the user.

Any help is appreciated!
 
You may get some options/alternative approaches from this site.
A form to gather ll parameters then open the report with specific data.

Good luck
 
What we need to have happen, if possible, is for those search parameters to show up in the header of our report if they have text in them. If the text box is blank, it should not show up in the header of the report.
I think this is the main part of the post.

It will be easier to implement if all the criteria are stacked in a tabular format like this:
Code:
Start Date: 04/08/2014
End Date: 05/08/2014
.
.
. etc
If it is, then do the following:
1. Convert the labels to textboxes. For example call the Start Date label txtStart_Label
2. Using txtStart_Label as an example, enter the following in its Control Source
Code:
=IIF(IsNull([txtStartDate]), Null, "Start Date")
...where txtStartDate is the name of the textbox that will hold the criteria entered (i.e. 04/08/2014)
3. Set the Can Grow and Can Shrink properties of the textboxes to Yes

The reason why you need to convert your labels to textboxes is because labels can't be set to grow or shrink.
 
Thank you vbaInet, that did the trick!
 

Users who are viewing this thread

Back
Top Bottom