Results 1 to 2 of 2
  1. #1
    Hatsuwr is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    1

    Searching for the highest applicable cell

    Hello everyone,



    Sorry to be so vague with this, but here is essentially what I am trying to do.

    I have two tables. The first table contains a list of objects and their attributes, with none of the objects repeated. The second table contains a list of attributes with no object yet paired with them. There are expected repeats here.

    Name Attribute 1 Attribute 2 Attribute 3
    Object A Xa Ya Za
    Object B Xb Yb Zb
    Object C Xc Yc Zc

    Attribute 4 Attribute 5 Attribute 6 Attribute 7
    Xa F2 F2 F3
    Xa G1 G2 G3
    Xb H1 H2 H3
    Xb I1 I2 I3
    Xb J1 J2 J3
    Xc K1 K2 K3

    What I need to do is, in a new table, list each object with the highest applicable Attribute 7 value. To be applicable, Attribute 1 of the object must match the corresponding Attribute 4 value. In addition, a function containing Attributes 2, 3, 5, and 6 must be less than a certain value.

    For example, if looking at Object B, because its Attribute 1 value is Xb, the only Attribute 7 values that are possible are H3, I3, and J3. From there, say we perform the function with Yb, Zb, H/I/J1, and H/I/J2 and only the results with rows I and J are low enough, that leaves us with just I3 and J3. I3 happens to be larger than J3, so Object B is listed with I3.


    Thank you for any help!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    It seems you are looking for records in one table that do not match perfectly with records in another table. There is a way to address this. You can use the Query Wizard and select "Unmatched". Having said that, it seems there is some additional criteria, regarding "Highest". Perhaps you can address this first.

    I would start with a SELECT query and add a Sort Order. Then, switch to SQL view and add TOP 10 or TOP 1 or TOP 39. The idea is to create a query that only retrieves the first records based on your Sort/ORDER BY.
    SELECT TOP 1
    http://www.w3schools.com/sql/sql_top.asp

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

Similar Threads

  1. Query to find applicable contact names to provide for emails
    By IncidentalProgrammer in forum Queries
    Replies: 5
    Last Post: 11-10-2014, 12:48 PM
  2. Query only returns fraction of applicable entries
    By sephiroth2906 in forum Queries
    Replies: 2
    Last Post: 04-22-2014, 01:44 PM
  3. Replies: 12
    Last Post: 01-15-2013, 02:35 PM
  4. Applicable Filters Box
    By Gray in forum Forms
    Replies: 0
    Last Post: 05-24-2011, 07:58 AM
  5. Can we post Access cell data to Excel cell properties?
    By Zethro in forum Import/Export Data
    Replies: 1
    Last Post: 12-13-2005, 08:42 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