Results 1 to 5 of 5
  1. #1
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28

    Query of a table with one record results in all records in database to be displayed

    I have a table with one record in it. I created a query with all fields defined and when run it shows the same field for every record in my database.

    Table = date
    ID
    Name
    Darted Yes/No
    Refrigerated Yes/no
    Notes


    Treatment Results
    __________________________________________________ ________________________________
    Date ID Name Darted Refrigerated Notes
    __________________________________________________ ________________________________


    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes









    qryDartingInfo
    __________________________________________________ ________________________________
    Date ID Name Darted Refrigerated Notes
    __________________________________________________ ________________________________
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes
    8/15/15 00:00 3MHM1 Mama Freckles Yes Yes


    I have a total of 102 records with horses that have not been darted and it looks like my query is appending the results of the one record in the table to every horse.

    Any and all help is greatly appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    That is normal if the query does not have a JOIN clause. How are these tables related? Post the SQL statement of the query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    Here is the sql statement. I added another record to the table and now there are two records listed for each horse in the database but only the records that are in the table are repeated over and over again.

    SELECT ContraceptiveTreatment.DateTime, ContraceptiveTreatment.ID, Alias.Alias, ContraceptiveTreatment.Delivery, ContraceptiveTreatment.Refrigerated, ContraceptiveTreatment.DartNotes
    FROM Alias, ContraceptiveTreatment;

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    As I said, there is no JOIN clause. This is basic Access query functionality. Review http://www.opengatesw.net/ms-access-...cess-Query.htm

    Did not answer the question. If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ZodiacPilot is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2015
    Location
    Dayton, Nevada
    Posts
    28
    You are the master of shredding the Black Diamonds! I was not joining the tables correctly. Thank you very much.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 03-02-2015, 01:21 PM
  2. Replies: 4
    Last Post: 12-30-2013, 01:49 PM
  3. Replies: 2
    Last Post: 01-21-2013, 11:28 PM
  4. Replies: 1
    Last Post: 03-09-2011, 02:04 AM
  5. Replies: 0
    Last Post: 02-24-2010, 12:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums