Option group on form

K

Kelly

I have created a form and put an Option group on the form. So by pressing
the option button you get Approved, Temp, or Out of Service. And I assigned
the OptionValue to 1, 2, and 3. But now the Option Values are showing up in
my table instead of the words Approved, Temp, Out of Service. I did research
this and it did say it would store the values in the underlying table. But
when I looked at the sample database Northwind their table doesn’t show the
values. What am I doing wrong??
 
K

Klatuu

You are doing nothing wrong. That is how option groups work. They return an
integer. The value they return is the Option Value of the currently selected
button. You don't necessarily have to have the actual words in the table.
The integer value will cause the corresponding button to show as selected for
existing records. The issue you face, however, is you may want the value to
display in places other than the form.

This is why I don't normally use option groups for bound controls. My
preferrance is a combo box based on a table that has the number and the
value. That way, the small lookup table can be related in a query to show
the name whenever I want it.

Why not just use the text instead of a number? Well, text values can change
for a group. When that happens, all that is necessary is to change to value
in the table rather than having to update the main table. It happened just
last week. My manager decided to change the name of two status codes. They
decided to replace "At Risk" with "Late" and "Completed" to "Complete"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top