Changing Control Types

G

Guest

Hello,

I originally created a form the recorded the values of Invoice, Credit and
Forced Credit as check boxes. Obviously, that allows the user to select one,
two, all or none of the choices.

Now I realize that they should only be allowed to select one of the values
in an options list. As this database already contains over 300 records, is
there an easy way to change the check boxes to combo boxes (in a options
list) while keeping the existing data intact?

I was able to change the control type, accordingly, on the form to options
boxes but they are individual controls so, users can still select one, two,
all or none of the choices. How do I link these three choices together?
Access help files mentions the OptionsValue in properties but that is not
displayed as an option for me.

Also, if I can get this to work, I would like to make the entire options
list a mandatory field; forcing users to make one choice. Please advise.
 
S

SusanV

Hi Jim,

What's your original table structure? It sounds as though you have 3 yes/no
fields, and would prefer a single field holding the appropriate value. If
so, you can add a new field, then use an update query to populate the new
field, and associate your option group to the new field. Of course, this is
only a valid option if you have no records where more than one checkbox is
set to true, if some records have multiple true boxes you will have bad
data...

For instance, say your 3 existing fields are Inv, Cred, and FCred, and the
new field is Status, and the table is called Table:

UPDATE Table SET Status = 1 WHERE Inv = TRUE
UPDATE Table SET Status = 2 WHERE Cred = TRUE
UPDATE Table SET Status = 3 WHERE FCred = TRUE

Now the option group would either populate 1, 2 or 3 in the status field
depending on which option is chosen, and reports can easily be formatted to
show "useful" information rather than a simple 1, 2 or 3.
 

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

Similar Threads


Top