Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Significance of any record in query results

    I have 3 tables: Sales, items, customers. Each has an autonumber key field. The Sales table includes a foreign field for items and for customers. The links work correctly.
    To find any sales records without matching records in the items table, I ran the unmatched query wizard and got a query named "Sales without matching items" which has what looks like an empty or new record, signifying there are no sales without valid items. Then I ran the unmatched query wizard to find out if I had Sales without matching customers. "Sales without matching customers" has no empty record - it is gray below the field names and navigation buttons are “grayed out”.
    What is the significance of the difference?

    Thanks.
    Sanora

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Sanora,

    I may be wrong but it seems to me that the Sales table should not have a foreign key for items but rather the Items table should have a foreign key for Sales {using the AutoNumber value from the sale}. As each customer can have multiple sales and each sale can have multiple items. Of course, not having your table structure makes this somewhat of a guessing game. It would help if you posted the table structures.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I tried to pose the question without the back-story, but here's a quick summary. The original database was badly designed - really not designed, just built. We are trying to rebuild the system, and have a lot of faulty data to salvage. As part of the cleanup, we were hunting incomplete records - hence the 'all sales without matching customers'. Access was doing what we needed, but we were concerned by the difference in responses and figured there was a reason why.

    In this case, we were indeed hunting any sales records that did not have customers.

    Thanks, and I should have given more info.
    Sanora

Posting Permissions

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