Translation of internal code ?

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I'm trying to find out how to display an internal code
from a table (Table 1) translated into a description via
another table (Table 2). I want the selected value stored
back as the code not the description selected. I dont want
the user to know anything about the codes; they should
only see the descriptions. Seems like a simple normal
thing but I've been stuck on it for half a day. As usual
Microsoft Help was useless.

Table 1
Code

Table 2
Code
Description
 
Dave,

The trick here is to create a query between the two tables
with the Code as a join and then drop the Description in the
grid instead of the Code. Now you can display the
Description at will if you base your forms or reports on the
query.

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
I am not sure if the snippet of answer below that I just
gave another 'Dave' who posted was you in a different post
or not, but here is how to set up a combobox to do that...

You can use the combobox 'Wizard' to build this for you. In
your form design go to your controls toolbar and make sure
that the wizard button ( the one with the magic wand ) is
depressed and then drop a combo box on your form. As you
follow through the wizards choices of looking up from a
table, query or list, choose your query. Select your code as
the first field, then your description as the second field.
Select the Code field as the field to bind the combobox to.
You should be presented the opportunity to check a box that
says 'Hide Key Field'. If so, check that. If not, when you
get to the part that lets you resize the width's, totally
collapse the first field, effectively setting the width to
'0"' as Andrew mentioned in his post. Finish out the wizard
and you should have what you want with the description being
displayed, but the hidden Code will be what is stored.


--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
Back
Top