A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Pull Data From Multiple Tables ????



 
 
Thread Tools Display Modes
  #1  
Old December 29th, 2009, 09:14 PM posted to microsoft.public.access.tablesdbdesign
malik via AccessMonster.com
external usenet poster
 
Posts: 50
Default Pull Data From Multiple Tables ????

Hi
I will have 4 tables name "TblCostomers","TblVendors","TblAccounts",
TblExpenses"
Now i have a for name "FrmDrVouchers" that has a table "TblDrVouchers" in
source.

This form has two TxtBox Control name "TxtAccountNo" and "TxtAccountName"

If User enters a Account No., It pulls the Account Name from Any One of these
Table.

I can do this if I have only one table.
But tell me how can i do it while I have 4 tables for One Field of a table

Thank you..

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200912/1

  #2  
Old December 30th, 2009, 04:47 PM posted to microsoft.public.access.tablesdbdesign
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Pull Data From Multiple Tables ????

By the lack of responses I suspect I am not the only one who does not
understand your question. If the form is based on tblDrVouchers, what do the
other tables have to do with anything? How do you "pull" the account name
into the text box? How are the tables related?

malik wrote:
Hi
I will have 4 tables name "TblCostomers","TblVendors","TblAccounts",
TblExpenses"
Now i have a for name "FrmDrVouchers" that has a table "TblDrVouchers" in
source.

This form has two TxtBox Control name "TxtAccountNo" and "TxtAccountName"

If User enters a Account No., It pulls the Account Name from Any One of these
Table.

I can do this if I have only one table.
But tell me how can i do it while I have 4 tables for One Field of a table

Thank you..


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200912/1

  #3  
Old December 31st, 2009, 04:35 PM posted to microsoft.public.access.tablesdbdesign
Armen Stein[_2_]
external usenet poster
 
Posts: 157
Default Pull Data From Multiple Tables ????

On Tue, 29 Dec 2009 20:14:15 GMT, "malik via AccessMonster.com"
u49026@uwe wrote:

I will have 4 tables name "TblCostomers","TblVendors","TblAccounts",
TblExpenses"
Now i have a for name "FrmDrVouchers" that has a table "TblDrVouchers" in
source.

This form has two TxtBox Control name "TxtAccountNo" and "TxtAccountName"

If User enters a Account No., It pulls the Account Name from Any One of these
Table.

I can do this if I have only one table.
But tell me how can i do it while I have 4 tables for One Field of a table


It sounds like you might have a poorly designed database structure.
You seem to be saying that "accounts" could be in four different
tables, but one of them is called "tblAccounts".

But, to answer your question: You could use a Union All query to
"vertically join" your 4 tables together, then use that query to look
up your textbox values. To be accurate, AccountNo needs to be unique
across all 4 tables. This approach might work, but I'm concerned that
it's just masking your design problem.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.