View Single Post
  #7  
Old February 9th, 2010, 02:49 AM posted to microsoft.public.access.forms
Ron[_23_]
external usenet poster
 
Posts: 27
Default Show code meaning rather than code value

I have a lookup table with two fields: Code and Meaning. Sample values
would be "A" and "Active", respectively.

My child table has a field for the Code as a foreign key, but I want my
form's textbox to show Meaning rather than Code, e.g. "Active" rather than
"A". As stated previously, I know a Combo Box will do this, and I know
how
to make it work, so this was not my question. My question is how to do it
with a Text Box.


Assuming the record source for the child table is MyQuery and that Code
field is FK, how about this:

Select Meaning from MyLookupTable where MyQuery.FK = MyLookupTable.Code

Store the query as MyQuery2 and use DLookup("Meaning","MyQuery2") as control
source for the text box.

Warning: Noob suggestion, based on advice given me in another thread for
analogous (but more complicated) situation. -Ron