Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Double references in a query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rolf Rosenquist - 29 Jul 2006 18:49 GMT
I have one table for vendors, one for customers and one for countries among
others. The two first have a field "countryNo" and the forms have references
to the country table via combo boxes for registering the addresses. It works
as intended for both tables.

In a query I want to get the fields for both the vendors and the customers
addresses together with orders. The addresses are written one by one and
they show up as expected, but when I use the country table to get the
countries I cannot get them properly.

Is there a way to tell the query that with the vendors country number it
should write the vendors country and with the customers country number show
the customers country?

/ Rolf
Douglas J. Steele - 29 Jul 2006 20:09 GMT
You need to refer to the country table twice in your query, joining one
instance to Vendor, and the other to Customer.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I have one table for vendors, one for customers and one for countries among
> others. The two first have a field "countryNo" and the forms have
[quoted text clipped - 14 lines]
>
> / Rolf
Marshall Barton - 29 Jul 2006 20:19 GMT
>I have one table for vendors, one for customers and one for countries among
>others. The two first have a field "countryNo" and the forms have references
[quoted text clipped - 9 lines]
>should write the vendors country and with the customers country number show
>the customers country?

Add the Countries table to the query twice.  The second copy
will be named something like Countries_1.  

Now, drag the vendor countryNo field to its counterpart in
the Countries table and drag customers table's countryNo
field to its counterpart in the Countries_1 table.

Make usre there are no extraneous connecting lines left over
from Access' attempts to make this automatic.

Signature

Marsh
MVP [MS Access]

Rolf Rosenquist - 29 Jul 2006 21:51 GMT
Thanks for the instructions that made it work !
/ Rolf

> >I have one table for vendors, one for customers and one for countries among
> >others. The two first have a field "countryNo" and the forms have references
[quoted text clipped - 19 lines]
> Make usre there are no extraneous connecting lines left over
> from Access' attempts to make this automatic.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.