Linking a Field to another Field

S

ScS

How would I go about linking one field to another?

ex:In one field I have the numbers 5276
I want to link that field to another so that it
automatically enters in another field.
ex:When I enter 5276, in another field, I want it to
automatically enter in 45

ScS
 
G

GVaught

How many possible number relationships are you talking about? Just one,
five, five hundred?

The easiest and if you are only dealing with 5276, then use code against
that fields After Update event
Thus something like this:
If me.fieldnamewith5276 =5276 then
me.fieldnameto45 = 45
Else
me.fieldnameto45 = 0 <-- This could also say Null
End If

If the values are text based then quotes must encapsulate the "5276" and
"45"

If you are dealing with a mass amount of numbers then use DLookup against a
table that shows the 4 number relationship to the 2 number relationship. The
DLookup will be set against the field containing the 2 digit value.
 

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