Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 7th, 2003, 07:48 AM
Registered User
Join Date: Sep 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combo box that links records from two tables...

Hi Fellows...

"Combo box that links records from two tables in one form..."

I have two tables. A Product table with fields Prod_id, Price and description. On the other table, Transaction table, I have Prod_id, Invoice_id and Quantity.

I have a combo box with data from the second table which displays invoice_id, prod_id and Quantity on textboxes. I want to click on a certain invoice_id on the combo box and also the price from the Product table should be shown in the form.


TK, Novice VBA Programmer, RSA
Old October 14th, 2003, 05:39 PM
Authorized User
Join Date: Oct 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Takawera,
Assuming Prod_id on the Transaction Table is the foreign key for Prod_id on the Product Table.
If that is the case, I would create an inner join query on your form, including both those tables.
In design mode, insert the price field onto your form whicn includes your combo box. Back in form mode, try your combo box out, it should work. I'm not sure if all your records will be automatically updated, you may have to go form by form and re-enter the combobox.
I am assuming you know how to create an inner join query & of course, you've already created a relationship between your two tables.
Write back if this is not the case or you need any other assistance (haven't explained myself well).
Good Luck!

Similar Threads
Thread Thread Starter Forum Replies Last Post
put mailto: links on list items in a combo box? webwolf Flash (all versions) 0 September 12th, 2008 08:01 AM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
How to apply filter to shrink combo box records beetle_jaipur Access 3 July 28th, 2007 01:58 AM
Filter records using a combo box tixe83 Access 2 August 3rd, 2006 12:43 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.