+ Reply to Thread
Results 1 to 3 of 3

Query Breaks When I Link The Table to Another Table

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    Query Breaks When I Link The Table to Another Table

    I’m fairly new to Access and I’ve encountered an issue I hope will be easy for one of you to tell me how to fix.

    I use Access to help organize personal relationships for a large number of people. There are two tables at play here. The first table list information about specific individuals, one person per row, and the second table is intended to track the relationships of multiple individuals.

    The individual table is

    Please Login or Register  to view this content.
    The Personal Relationship table is:

    Please Login or Register  to view this content.
    I also have a query created where it prompts me for a name, and then returns only the rows where that name is in either the person 1 or person 2 fields of the Personal Relationship table. The problem I’m having is that I can only get that query to work if the names in the Personal Relationship table are manually typed for each record, as opposed to limiting the Person entries to only those that are already entered on the Individual table. I can get the Personal Relationship table to only accept names already on the Individual table by means of a drop down menu (reminds me of data validation in Excel), but when I put in that restriction, the query no longer works. I’ve tried reusing old query’s as well as creating new query’s, and I just can’t get the query to return any results if I make it so that the Personal Relationships table is linked to the Individual table as it relates to the person column.

    I hope this makes sense the way I have described it. Would one of you please tell me what I’m doing wrong that is preventing me from ensuring that a name can only be on the Personal Relationships table if it is first on the Individuals table, AND have a query that only returns the entries from the Personal Relationships table with the name I type in the pop up box that are in either the Person1 or Person 2 fields? I know how to get each of these things individually, but for some reason I can't figure out how to marry them together so I can have both.

    Thanks for your time!

    -Opie

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: Query Breaks When I Link The Table to Another Table

    you should not be using names in the extraneous tables. ALL names should be in the tNames table,
    other tables ,like the tRelationship table, should be using NameKEYS.

    Person1, Relationship, Person2
    123, "brother", 567


    PersonKey, FirstN, LastN
    123, Bob ,Smith
    567, Joe , Smith

    you still enter the 'name' in the param, that joins tNames to tRelationships

  3. #3
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Minnesota
    MS-Off Ver
    Office 365
    Posts
    163

    Re: Query Breaks When I Link The Table to Another Table

    Well I think it have it working...my first test seemed to work, so now to try to implement it on the larger scale. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamic link to Access query for updating Excel table
    By BanginMyHeadOnMyDesk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-22-2017, 11:45 AM
  2. query to web link does not return the table as before instead a message
    By rrobelen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2017, 12:08 PM
  3. VBA Web Query that gets data from a link not a table
    By jd01442 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2013, 01:15 PM
  4. Replies: 0
    Last Post: 12-05-2012, 03:48 PM
  5. VBA Open Text File <Missing Link> Query Table + Extras
    By duncanm82 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-24-2012, 04:56 PM
  6. Replies: 2
    Last Post: 05-19-2010, 05:14 AM
  7. [SOLVED] Syntax Error - Using Microsoft Query and ODBC link to a table
    By James T in forum Excel General
    Replies: 0
    Last Post: 08-30-2005, 10:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1