Loading Data From Related Tables To Form Text Boxes

ColinKJ

Well-known Member
Joined
Jan 27, 2009
Messages
983
Hi All,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I'm new to Access, and I'm in the process of building a form.<o:p></o:p>
<o:p></o:p>
I've had some very usefull help from Norie and Bob Larson so far, now I'm looking for assistance in getting some more data from some related tables to display in two more Textboxes.<o:p></o:p>
<o:p></o:p>
So far, when the form is opened, there is a Textbox named Contract No, when you Double Click in this Textbox, a Listbox is displayed showing a list of Contracts, No's and Names. When you Double click on a selection from the List, the Contract No is displayed in the Contract No Textbox, and the Contract Name in the Contract Name Textbox, the Listbox is then hidden.<o:p></o:p>
<o:p></o:p>
Now, based on the Contract No selected, I want to populate two more TextBoxes, Account Manager, and Business Unit.<o:p></o:p>
<o:p></o:p>
I have a Table called tbl_Contract_Details which contain fields that identify the Account Manager ID and the Business unit ID related to the contract No's. I then have two Tables tbl_BUList and tbl_AccMgr from which I want to get the Business Unit Name and Account Manager Name based on the related ID’s and put them in the two Textboxes.<o:p></o:p>
<o:p></o:p>
I hope I've explained that ok, any help much appreciated.<o:p></o:p>
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
What you should do is to include the Contract details with the list box's row source and you could just display them in the text boxes using

=[ListBoxNameHere].[Column](3) (where 3 is the fourth listbox column, for example)

Since you don't need to store that information since this data is obviously tied to the contract, then you should just display it and not store it again. Does that make sense?
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,813
Members
452,945
Latest member
Bib195

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top