Results 1 to 3 of 3
  1. #1
    Grek is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    39

    What's wrong with my query?

    Hi,
    Do you have any idea what is wrong with my query?


    Instead of having all my fields within the same table, I decided to create 4 tables (Internal tasks, Promoter Tasks, etc).
    The issue is that now my query doesn’t return any result?
    Is it due to the way the table are linked, or something like that?
    Thanks,

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    The UniqueID field in each table is an Autonumber. These ID's have no relationship. They might stay in sync if all tables are always populated together with new record. I see that your tables don't all have the same records. General and InternalTasks both have 4 records but the other two have less than four. So record 4 when it is created in IMTasks will not be related to the existing record 4 in General. Another risk with autonumber is that a new record can be initiated then aborted but the number will already have been committed. This can result in sequence gaps with autonumber.

    The ID in General table needs to be Autonumber primary key and the ID fields in other tables need to be Number type foreign keys. Then join the 3 subordinate tables to General table. Change the Relationships to reflect this. You do have InternalTasks and IMTasks related to General but why is PromoterTasks related to InternalTasks? The jointypes of the Relationships and the query need to be 'Include all records from T_NewLaunches_General and only those records from...' Change jointypes with the current setup and you will get records but because of the Autonumber issue they will not be properly related.
    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
    Grek is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    39
    Makes sense - thanks for your help, seems to be working now!

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

Similar Threads

  1. What's wrong!
    By khalid in forum Programming
    Replies: 15
    Last Post: 06-27-2011, 06:38 AM
  2. What is wrong with this IFF?
    By bburton in forum Reports
    Replies: 2
    Last Post: 03-16-2011, 10:42 AM
  3. What's wrong with this query?
    By jsoldi in forum Queries
    Replies: 2
    Last Post: 10-11-2010, 07:45 AM
  4. Query for latest date? what am I doing wrong?
    By Overdive in forum Queries
    Replies: 1
    Last Post: 12-18-2009, 06:04 AM
  5. What am I doing wrong?
    By brandon in forum Access
    Replies: 2
    Last Post: 08-03-2008, 10:26 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