changing report columns based on a value in a form (1 Viewer)

Funkyaccess

Registered User.
Local time
Today, 12:26
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
 

DCrake

Remembered
Local time
Today, 20:26
Joined
Jun 8, 2005
Messages
8,632
In you controlsource of a particular column you could employ an iif()

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

David
 

Funkyaccess

Registered User.
Local time
Today, 12:26
Joined
Oct 8, 2009
Messages
69
thanks I'll try that what about my second question on where to find out about events?
 

DCrake

Remembered
Local time
Today, 20:26
Joined
Jun 8, 2005
Messages
8,632
Are you talking abut event procedures for reports in general?

You need to look at Acess help for this.

David
 

Funkyaccess

Registered User.
Local time
Today, 12:26
Joined
Oct 8, 2009
Messages
69
not only reports but forms,lables,textbox,comboboxes etc.

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

Funkyaccess

Registered User.
Local time
Today, 12:26
Joined
Oct 8, 2009
Messages
69
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)
 

Funkyaccess

Registered User.
Local time
Today, 12:26
Joined
Oct 8, 2009
Messages
69
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

Top Bottom