How do I program 2 fields in the same table?

G

Guest

I have 2 fields in a table. Field 1 is a lookup.
Field 1 Field 2
a 0.25
b 0.50
c 0.75
d 1.00
When I write or select a value from Field 1, I need an instruction to write
the numeric value in field 2. How I can do this?

Thanks
 
R

Rick B

You don't. Since Access is a relational database, you only store the value
in the related table. You store the link (field1) in your main table and
create a relationship between that table and your source table where you
define what each letter means.

In your reports, queries, and forms, you can pull the value using that
relationship.

There is one exception. If "a" will be 0.25 today, but may be something
different tomorrow and you need to know the value at the time the record was
created. If this is the case, then you would want to store it. Based on
your example, I'm guessing this does not apply to your design though.
 

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