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

    Structured Activity

    I am doing a query for a co-worker of mine for Structured Activity..

    I have to display any company that has done 3 or more transactions between the amounts of 7,000 and 10,000.. (I would have to display the whole record which has about 15 columns)

    I do not know how to look both of these up in a single query.. Please point me in the right direction...


    Company, Transaction
    abc, 5200


    abc, 6300
    abc, 8756
    cde, 1500
    cde, 10000
    cde, 9500

    The Result would be the 3 ABC's - with all the fields associated with them...
    Last edited by Logix; 06-09-2010 at 01:38 PM. Reason: added more information

  2. #2
    Join Date
    May 2010
    Posts
    339
    How about a simple parameter query with this in the criteria under the amount field:
    Code:
    BETWEEN [Enter value more then 6,999] AND [Enter value less then 10,001]
    then in your transactions field sort in decending order. Or set the query for the top 5 values. Not very elegant but it might be a starting point?

  3. #3
    Logix is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    3
    Quote Originally Posted by Access_Blaster View Post
    How about a simple parameter query with this in the criteria under the amount field:
    Code:
    BETWEEN [Enter value more then 6,999] AND [Enter value less then 10,001]
    then in your transactions field sort in decending order. Or set the query for the top 5 values. Not very elegant but it might be a starting point?
    I began with something like this - the issue is - I have approx. 40,000 records that I need without knowing the how many meet this critiria...

    This is the code I have
    Code:
    SELECT [Wires_I-incoming_O-outgoing].[OrderParty Name], [Wires_I-incoming_O-outgoing].[Transaction Amount]
    FROM [Wires_I-incoming_O-outgoing]
    WHERE [Wires_I-incoming_O-outgoing].[Transaction Amount]>=forms!structured!min1 And [Wires_I-incoming_O-outgoing].[Transaction Amount]<=forms!structured!max1
    GROUP BY [Wires_I-incoming_O-outgoing].[OrderParty Name], [Wires_I-incoming_O-outgoing].[Transaction Amount]
    HAVING (((Count(*))>=1))
    ORDER BY Count(*) DESC;
    I thought I could get away with the HAVING COUNT line - but that will only bring up duplicates if I increase that number... I just have to find out how to add in this code - the ability to look at these results and find records that contain 3 more from the same company name...

    thank you again

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

Similar Threads

  1. How to Close access form after no activity
    By russ0670 in forum Forms
    Replies: 1
    Last Post: 05-17-2010, 08:17 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