Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking up related tables in combo boxes

Status
Not open for further replies.

toon10

Programmer
Mar 26, 2004
303
0
0
DE
Hi

I have a VB 6 form which sits on top of a part table in Access. The form allows the user to select a part from a combo box. They can also add, delete and edit parts on the database.

All is fine except that when a new part is entered, the part table takes a ProductID field which is linked to a Product table. For example, on the part table, part XX1234 might have a ProductID of 3, which relates to a specific product on the product table. What I want to do is when adding a part, instead of having to type in “3” and expecting the user to know what product that is, I want to a combo box to lookup the description from the matching product table instead. Obviously, when the record is saved, the productID is saved to the part table.

I hope I’m making sense!

Cheers
 
Hi,

U can use Databound combobox.

with combobox
.recordsource = tblname
.listfield = product description
.boundfield = product ID
end with

Muraliambt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top