changing report columns based on a value in a form

Funkyaccess

Registered User.
Local time
Today, 02:07
Joined
Oct 8, 2009
Messages
69
Hi,

I have a form that has a radio button on. What I want to do is change the data source for a particular column of my report based on the radio buttons value.

eg. radio button has two option "show col1" or "show col3"

my report is as follows

Col1 | col2

If the user has selected "show col3" then the report should look like this
Col3 | col2

I know I can do this with vba but I'm not sure which event to use to trigger the change.

In general is there anywhere I can get a list of events and what/when to use them?

Many Thanks
 
In you controlsource of a particular column you could employ an iif()

ColumnX
ControlSource: =IIF([Radar] = True,[FieldA],[FieldB])

David
 
thanks I'll try that what about my second question on where to find out about events?
 
Are you talking abut event procedures for reports in general?

You need to look at Acess help for this.

David
 
not only reports but forms,lables,textbox,comboboxes etc.

Like on print, on retreat, on click, on change, before update etc.
 
Hi David,

I need some help how do I reference this radio button/option group's value?

I have a form that has tabs. On one of the tabs there is this option group which contains the radio buttons.

control source = iif(button = 2 , bank_statement_date,data_for)
 
This has now been resolved. The problem was that it was a Name confict. I had a textbox whose name was data_for and so it was causing the conflict.
 

Users who are viewing this thread

Back
Top Bottom