views:

796

answers:

2

Hello, I'm new to Access so please consider this when forming your response. This has been driving me crazy and I've looked high and low on the 'net for a solution. I look forward to your response.

I have a form with an option group. I've wish to have this display on my report. Take for instance this "test" scenario:

Options a, b, c

I've created a field in my table to accept the data from the form. In my table, I see 1, 2, 3 when I save a record. Good enough. Now, in my report, I have checkboxes representing options a, b, and c. I wish to have a checkmark within the box corresponding to the option selected on the form.

Thank you for your time and expertise!

A: 

An option group is a user interface object, and UI objects don't belong on reports.

Your data field stores digits, but each of those digits has a meaning. On a report, you want the meaningful data displayed. That means that you need a data table that maps 1, 2 and 3 to something, and then join that table to the field you're storing the option group value in.

Another approach would be to use Switch(), but that means that you'd have to edit the report any time you add another option. A data table makes that a lot easier, as you just add a new record to add a new value.

--
David W. Fenton
David Fenton Associates

David-W-Fenton
Aren't text boxes and labels user interface objects too? I don't know how one would output anything useful on a report without at least one or two of the controls in the UI toolbox.
John Mo
No. Textboxes are display-only in a report. But the purpose of an option group is not to display data, but to restrict data entry. Likewise, a dropdown list has no place on a report. It's a waste of real estate on your report to display anything but the value stored in the field.
David-W-Fenton
Everything is display-only in a report. I've used option groups as a quick and easy graphical representation. The example that comes to mind was an aging report with the option group flagging 30, 60, and 90 days past due. Wasted real estate?
John Mo
Aging is generally done in accounting with columns for 30, 60 and 90 days. I don't know how an option group contributes to that. The purpose of an option group is to insure valid data by limiting it to the allowable options. Since reports aren't editable, it's the wrong control type.
David-W-Fenton
Sometimes reports are printed versions of a user interface; like a form. This way they can see the choices: Red, White and Blue and the check box not only tells them which ones were picked, but which ones were not picked. Just listing "White" would not be as helpful.
Jeff O
If you're using reports to duplicated printed forms or data entry forms, sure, it's reasonable to use an option group. But that's the exception rather than the rule, in my opinion. If you have combo boxes or listboxes or option groups or command buttons on your report, in most case, you're doing something wrong.
David-W-Fenton
A: 

There's no technical limitation preventing you from displaying output on a report using an Option Group and check boxes.

In the design view of the report, add an option group control from the controls toolbox.

Add 3 checkbox controls to the option group control. When you select the check box control and hover the pointer over the option group, it will change color to indicate that the check box will become a part of the group when placed.

I added three check boxes to an option group on a report and they defaulted to values of 1, 2, and 3, so this should go pretty easily for what you're trying to do.

In the Property Sheet with the option group selected, make sure the Control Source property is set to the column with the 1, 2, 3 value in the underlying data source.

You might want to set the border style to hide the box around the checkboxes and also delete the label control that is automatically generated for the option group. I'm not sure what kind of look you're going for, but I'm sure you can handle the formatting details.

John Mo
If you're using check boxes, you shouldn't be using an option group. An option group is for mutually exclusive choices, while checkboxes are for non-exclusive choices. This is standard UI across all modern graphical UIs that I'm aware of, however often you see it misused in web pages.
David-W-Fenton
True. I'm a stickler about forms and UI standards. Reports... not so much.
John Mo