Connecting Tech Pros Worldwide Forums | Help | Site Map

Auotmatically getting info from another field

jballard@acecwi.com
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello,

I have a database set-up with a form and two subforms in it. I have one
of the subforms (replacement parts) set-up where you can pick part
numbers from a drop down box and also pick a description of the part
from a drop down box. These are two separate fields. I want to be able
to pick the part number and have it put in the description
automatically or the other way around. Which ever would by easier?

I have a table with just the part numbers and descriptions. Then I have
it adding this info into a main table in relation to the serial number
of the machine getting the replacement parts. Please help,


Steve Jorgensen
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Auotmatically getting info from another field


In generaly, the replacement part table should contain only a single foriegn
key that references the primary key of the parts table. You would have 2
combo boxes in the subform, each with a hidden bound column for the primary
key, one that has the part number in the first visible column, and one that
has the description in that column. Both if these combo boxes should be bound
to that same foreign key field, so when you make a selection in one, the other
automatically reflects that change.

Note that the primary key should usually be a hidden Autonumber key (a
surrogate key), not the human-readable part number. You should have the part
number be a "logical key" by making it indexed: Yes (No duplicates), but it's
better to have the -primary- key be "just a number", so you can change a "part
number" logical key if you need to with no consequences for the relationships.

On 15 Dec 2004 06:59:35 -0800, jballard@acecwi.com wrote:
[color=blue]
>Hello,
>
>I have a database set-up with a form and two subforms in it. I have one
>of the subforms (replacement parts) set-up where you can pick part
>numbers from a drop down box and also pick a description of the part
>from a drop down box. These are two separate fields. I want to be able
>to pick the part number and have it put in the description
>automatically or the other way around. Which ever would by easier?
>
>I have a table with just the part numbers and descriptions. Then I have
>it adding this info into a main table in relation to the serial number
>of the machine getting the replacement parts. Please help,[/color]

David
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Auotmatically getting info from another field


Check this Access web site out it sounds like it will answer your
question

http://www.rogersaccesslibrary.com/TableOfContents3.asp

Go to Cascading Combo Boxes.

This sounds like what you want to do.

You can download the Mdb and see how they did something similiar
Hope this Helps

Dave

Closed Thread