Query between Fields

A

abc

I have a table with a field called Type. Records for type include:
Peer, Group of Peers, Supervisor, and Other.

I need to create checkboxes for Peer, Group of Peers, Supervisor, and
Other.

I'm not really good with queries, but is there anyway to query the name
of the TYPE and have it check it off in the checkbox.

For example:

**Currently in my table-**
RecordID: 100
Type (text): Peer

**What the table needs to look like**
RecordID: 100
Type (text): Peer
Peer (Yes/No): CHECKED!
Group of Peers (Yes/No): not checked
Supervisor (Yes/No): not checked
Other (Yes/No): not checked

Eventually, I'll delete Type (text) once I get all my data checked off
in the corresponding checkboxes.

PLEASE HELP!
 
J

John Vinson

I have a table with a field called Type. Records for type include:
Peer, Group of Peers, Supervisor, and Other.

I need to create checkboxes for Peer, Group of Peers, Supervisor, and
Other.

I'm not really good with queries, but is there anyway to query the name
of the TYPE and have it check it off in the checkbox.

For example:

**Currently in my table-**
RecordID: 100
Type (text): Peer

**What the table needs to look like**
RecordID: 100
Type (text): Peer
Peer (Yes/No): CHECKED!
Group of Peers (Yes/No): not checked
Supervisor (Yes/No): not checked
Other (Yes/No): not checked

Eventually, I'll delete Type (text) once I get all my data checked off
in the corresponding checkboxes.

PLEASE HELP!

If these fields are mutually exclusive - i.e. if only one checkbox
should be checked - then your suggested structure would be incorrect:
the value of a field should not depend on other fields. Might you be
just looking at a user-interface issue? Consider using an integer
Number field for Type, with 1 meaning Peer, 2 Group of Peers, etc; and
use an Option Group control bound to it on a form. This would let you
display four checkboxes but only store one number.

If a record can validly have more than one box checked, your best bet
would be to move this one to many relationship out to a second table.

BUT... to answer your question... Just add the four fields and run an
Update query:

UPDATE yourtable
SET [Peer] = ([Type] = "Peer"),
[Group Of Peers] = ([Type] = "Group Of Peers"),
[Supervisor] = ([Type] = "Supervisor"),
[Other] = ([Type] = "Other")
WHERE [Type] IS NOT NULL;

John W. Vinson[MVP]
 
Top