Results 1 to 3 of 3
  1. #1
    Demonweare is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    1

    Group by one field, but not another!?

    To lay it plainly, I am designing an Auction database.



    I have a table that lists each bid as they are placed. Fields: Artwork No., Bidder No., Amount

    I need to then be able to see, at any time, which bidders have the highest bid on each artwork. Output: Artwork No., Bidder No., Amount (max of...)

    Building a query that groups on the Artwork No. and finds the max of the Amount does not work because I don't know which bidder had the highest bid. Adding the Bidder No. field produces more problems.

    Is there a way that I can design my query so that I know what the highest bid on each Artwork is and who had that highest bid, or will I have to build a macro?

    Thanks, guys!

  2. #2
    evander is offline Competent Performer
    Windows 7 Access 2003
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    206
    Yes there is. You'll have to create intermediate queries.
    Check out the attached file.

    But it won't work if there are ties. I guess you would choose the person who made an earlier bid in case of ties.

  3. #3
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,180
    Hi,

    have you tried using a dlookup function with a nested dmax?
    Something like
    DLookup("BidderNo","MyBidsTable", "Article = " & articlenr & " and Amount = " & dmax("Amount","MyBidsTabel", "Article = " & articlenr ))

    Could be rather slow, though.

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

Similar Threads

  1. how to group?
    By wconan in forum Access
    Replies: 2
    Last Post: 03-08-2010, 09:44 PM
  2. Group by
    By EstesExpress in forum Queries
    Replies: 0
    Last Post: 02-26-2010, 07:52 AM
  3. Group report by a multivalued lookup field
    By jonsons in forum Reports
    Replies: 0
    Last Post: 12-01-2009, 04:08 PM
  4. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:53 AM
  5. Top 2 by group
    By griz in forum Access
    Replies: 0
    Last Post: 05-25-2008, 07:10 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