Results 1 to 4 of 4
  1. #1
    Joshcorp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2017
    Posts
    2

    Noob question on query design

    Hello All. I am sure that this question has a very simple answer, but given my inexperience with Access I am finding it quite vexing. Here is my problem:



    I have two tables of data sorted by date and time in 5 minute increments. I have linked the two tables already, matching the date in the first table with the corresponding column in the second. Table 1 contains a column of the date/time and each record is unique. Table 2 has a similar column (the linked column) except that there are multiple records with the same date/time. I want to query out only the record that contains the minimum value for each unique date/time entry from table 1. I also want two more field items from table 2 that are specific to the record that contains the aforementioned minimum value.

    I used the query designer to successfully return the minimum value I wanted to see for each unique Data/Time record. My problem is that when I attempt to add the other two fields to the query from table 2, it then gives me every single record for each date/time pair instead of just the full record set of the records containing the minimum value. I hope I have explained this well enough...

    Any help is appreciated. Im sure this is a very simple problem for anyone semi proficient with Access but unfortunately I am just not quite there yet.

    Thanks!!

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You are probably using a totals query with something like MIN in the Totals row in the query grid. Since it is a totals query, all fields added to the grid come into play.

    For this example:
    Save the current query as "qryMin1". Create another query, add "Table2" and "qryMin1".
    Link the query and table on the appropriate fields.
    Drag down the fields in "qryMin1" and the two fields from Table2 that you want.

    Execute the new query.

  3. #3
    Joshcorp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2017
    Posts
    2
    That worked, thanks!!

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    No problem..Glar to help.

    And welcome to the forum.....

    (I'll mark this as solved for you)

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

Similar Threads

  1. Noob help with table design please
    By Neb in forum Database Design
    Replies: 3
    Last Post: 02-12-2017, 08:55 AM
  2. Replies: 2
    Last Post: 06-25-2015, 11:42 AM
  3. NOOB - moving controls in design view
    By brettnolan in forum Access
    Replies: 4
    Last Post: 04-24-2014, 05:37 PM
  4. Noob needs help with form design
    By Motoman in forum Forms
    Replies: 17
    Last Post: 04-03-2014, 04:20 PM
  5. Replies: 9
    Last Post: 07-21-2010, 06:34 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