Make fields visible in a report based on criteria from a form

skooterboy

New member
Local time
Today, 09:37
Joined
Aug 30, 2012
Messages
7
Hi All,

I'm kinda stuck on something. I'm trying to make fields either visible or invisible based on criteria chosen in a form.

I have a table with five fields, call "Sign Selection"
Field 1 is called "Window banners"
Field 2 is called "Theme pennants"
Field 3 is called "Exterior banner"
Field 4 is called "Entrance card"
Field 5 is called "Pole sign"
All fields are a 'yes/no' type

I have a report that will generate a list of retail stores from a query called "Store attributes" which shows how many of each sign element each store should receive.

However, when distributing the signs, sometime I'm only shipping two out of the five types. I know that I can go into the design of the report and uncheck certain fields so they don't show up, but I need to make this more user friendly. I'd like to control this with check boxes on a form, so my user will open the form, check off the appropriat types of signs. Then run the report that will show only those sign types.

Any ideas?
Let me know if my question needs more clarity.

Tim
 
I would set up check boxes on your form. I would create an on load event for the report that states if the control (ck box) is checked (ie. value = true) then the control on the report should be visible, otherwise it should not be visible.

Alan
 
Hi Alan,

Thanks for the suggestion. The only problem is, is my coding in VBA. I created the ON LOAD event in my report, but the compiler doesn't like it.

Private Sub Report_Load()

Me.Window_Banners_.Visible = False

If ([Store Attributes1]![WB]) = True Then <-- doesn't like this line. I need it to reference the Store Attributes table to see if "WB" is checked or unchecked.


Me.Window_Banners_.Visible = True
Else
Me.Window_Banners_.Visible = False
End If
End Sub
 
I think that you need to define your table as a recordset first. I don't work with reports so I am not to sure. Hopefully, someone with more experience in that area will chime in.
 

Users who are viewing this thread

Back
Top Bottom