Full Version: Lookup Fields?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Rhonda
I have done this before, don't know why I am having such trouble this time!!!

I have a table tbl_items. In this table are 3 fields-autonumber, item number, and item description.

In my form, I am trying to make this "autofill". What I need to do is in box 1 choose the item number and in box 2 have the description for the item number chosen in box 1 to fill in automatically. Example:

Item table-
auto number item number descritpion
1 1234 cutter
2 1235 stapler
3 1236 speaker

Form-
Item number 1234 Item description <<this is where I want the description to go from the item number 1234 chose in the previous field>>>

How do I do this? As I said I have done it before (a couple of years ago) and for the life of me, cannot remember how to do it now!!! This is so frustrating!!! Please help!!
jmcwk
Rhonda,

Are you using a Combo Box to select your item ? I assume you have a Lookup table for your items and a foreign key in your detail table to the lookup table of items ?

tbluItems
ItemID (Primary Key Autonumber)
Item
Description

tblItemsDetail
pkItemDetailID (Primary Key Autonumber)
fkItemID (Foreign Key to tbluItems)

try using a query as the record source of your form with All tblItemsDetail included in the query Grid as well as Description from the tbluitems then using the Wizard build a combo box on your form with tbluItems as the record source of the Combo and when asked which field you want to store the value selected pick fkitemID

Of course the tblItemsDetail was used only as an example

HTH
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.