Table Question

D

Dee

I have a table where the "contact type" is a text box. I created a form and
made the field "contact type" an option group with the choices "Investigator"
or "CRO". When I look in my table the contact type field has contact type 1
or 2. Is there a way to have the table show "Investigator" or "CRO" instead
of the value 1 or 2. I am using Access 2003.

Thanks in advance for your help.

Best regards,

Dee
 
G

Graham Mandeno

Hi Dee

An option group can only give you a numeric option.

I suggest you change your "ContactType" field to numeric (size=byte) instead
of text. Then add another table named "ContactTypes" with two fields:
CTCode: Numeric (byte) - primary key
CTName: Text

Add a one-to-many relationship between the PK of this table and the
ContactType field of the other table.

Add two records to this table:
1 Investigator
2 CRO

Now, when you want to see the CTName corresponding to the ContactType, you
simply add the ContactTypes table to the underlying query for your form or
report and use the CTName field.

This might seem like a lot of trouble to go to, but the big advantage is
that it's really easy to add another contact type in the future.
 

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