Results 1 to 5 of 5
  1. #1
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128

    Build an expression without table joins, i.e. use something other than &

    I'm trying to build an expression which creates a SKU for for my items in inventory. The table relationships and expression look like this:



    What I'm trying to do is create an expression where it only creates sku's with the unique ID's associated with [Items_Parent].[Vendor_Item_Code]. In other words, I want to limit the table joins unique to the identifiers which they are related to. But of course, it returns every combination of this with [Vendors].[Vendor_Code] and


    [List_of_sources_for_items].[Descript_of_Source]. I think it has something to do with using "&" as the joiner, but I can see where I somehow need to incorporate the identifier relationships to list only the unique values.

    e.g. - I have a vendor code BB23. It has the identifier "Vendor Attached" which is connected to a single vendor, BS. But when I build this expression, it returns each vendor code combination. So say I have 3 vendors, BS, RR, and CAP, I get 3 SKU's with BS, RR, and CAP. But I only want BS-BB23. How can I limit the expression to only return this value?
    Attached Thumbnails Attached Thumbnails Picture1.jpg  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The table [constraint fields] in query without JOIN results in a Cartesian relation of records.

    Could have an IIf() that will return Null or some other value if field is not BS.

    Or restrict the records - apply filter criteria.
    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
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128
    Quote Originally Posted by June7 View Post
    The table [constraint fields] in query without JOIN results in a Cartesian relation of records.

    Could have an IIf() that will return Null or some other value if field is not BS.

    Or restrict the records - apply filter criteria.
    I'm not sure what you mean by the first part. Can you flesh this out a bit more?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Okay, take a query with only two tables and no JOIN clause. Every record from each table will associate with every record of other table. In your query, every record of [constraint fields] table will associate with every record generated by the other joined tables.
    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
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128
    Actually, I discovered that my problem is that I'm using another query to create some fields, and needed to create a relationship from that query to one of the tables. Thanks for your help!

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

Similar Threads

  1. Replies: 3
    Last Post: 08-18-2014, 10:11 AM
  2. Replies: 7
    Last Post: 05-22-2014, 06:17 AM
  3. Replies: 1
    Last Post: 03-13-2014, 03:02 PM
  4. Replies: 9
    Last Post: 08-31-2012, 12:00 PM
  5. Two Sums, Three Table, and joins problem
    By jbarbara11 in forum Queries
    Replies: 1
    Last Post: 12-08-2010, 03:46 PM

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