Populate Fields

N

Nick Jax

Hello,

On my Access form have 2 fields. Code and Code Description. The code field
does a look up on a table and allows the user to select the code they want.
The table contains the code and code description fields only.

What I'd like to be able to do, is if a user selects code A1 (for example)
the code description field automatically populates with the code
description. How can I achieve this?

Thanks all!
 
K

kingston via AccessMonster.com

Is the control for the code field a combo box? If so, you can change the row
source to include the description in an additional column as long as you can
construct the query properly. Then, you could use the combo box's
AfterUpdate event to set the second field's value:

Me.CodeDescription = Me.ComboCode.Columns(1)
 
Top