Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 13th, 2004, 09:41 AM
Authorized User
 
Join Date: Jun 2003
Location: Conway, AR, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kev_79
Default Multiple lookups in same table

I have a collection table that has a collector listed in it up to 5 times. The table uses the "collectors" table to populate the lookup, and that table is dynamic.

I am having trouble using the query grid and getting the names to show up in the collection table. When I link it, I can only link it to one, b/c when I do a second it gets confused.

How do you handle this.

Thanks,
Kevin
Reply With Quote
  #2 (permalink)  
Old February 13th, 2004, 02:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Norwich, Norfolk, United Kingdom.
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry Kevin, but I think you'll have to give more details of what you are trying to achieve. I read your query several times and still can't work out what you mean.

Clive Astley
Reply With Quote
  #3 (permalink)  
Old February 13th, 2004, 03:49 PM
Authorized User
 
Join Date: Jun 2003
Location: Conway, AR, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kev_79
Default

The tables are Collector and Collection

Within Collection, collector.CollectorID=Collection.CollectorID

Except, Collection has Collector1, Collector2 and Collector3 all related to the Collector lookup table.

When I query using query grid, I can only select Collector once, otherwise it gets confused.

I am just wondering how to do this and get it to return the names of the collector for all 3 fields. The true data in the field is the primary key of Collector and I need it to reference the name field in collector.

Thanks,
Kevin
Reply With Quote
  #4 (permalink)  
Old February 15th, 2004, 05:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Access [u]shouldn't</u> get confused by that, it should just add "Collector" with an Alias, like "Collector_1", in which case you can just create the relationship between the fields, which is fine. So that in the end, if you looked at the SQL of the query, it would be something like:
Code:
SELECT *
FROM ((Collector INNER JOIN Collection ON Collector.CollectorID = Collection.Collector1) 
INNER JOIN Collector AS Collector_1 ON Collection.Collector2 = Collector_1.CollectorID) 
INNER JOIN Collector AS Collector_2 ON Collection.Collector3 = Collector_2.CollectorID;
Steven

I am a loud man with a very large hat. This means I am in charge
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookups Gajun Access 5 September 20th, 2007 07:26 AM
Counting Lookups elsewhere in the XML ashcarrot XSLT 5 July 17th, 2006 11:09 AM
Multiple table help dbartelt Access 3 May 31st, 2006 08:15 AM
Multiple table Query-HELP Kathryn SQL Language 1 March 22nd, 2005 10:57 AM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM



All times are GMT -4. The time now is 10:27 PM.


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