Results 1 to 3 of 3
  1. #1
    chuki2 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    Selangor,Malaysia
    Posts
    26

    Do not want to popup parameter query

    Hello friends, i have problem with my query..

    Code:
    SELECT tblProduct.type, tblProduct.model AS Model, Count(tblProduct.model) AS qty, tblProduct.cost, [qty]*[cost] AS TotalFROM tblProduct
    GROUP BY tblProduct.type, tblProduct.model, tblProduct.cost, [qty]*[cost], tblProduct.buyDate
    HAVING (((tblProduct.buyDate) Is Null));
    When I run query, will appear popup parameter.. So I think the problem come from QTY... But I just click ok, the result everything is correct.

    How if I don`t want popup parameter?

    If I don`t use QTY, how I can count the quantity item and multiple the cost by group?



    Thanks for help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Don't include the Total calculation in GROUP BY, set it as Expression in the Total row of query design grid.
    SELECT tblProduct.type, tblProduct.model AS Model, Count(tblProduct.model) AS qty, tblProduct.cost, Qty*[cost] AS Total FROM tblProduct
    GROUP BY tblProduct.type, tblProduct.model, tblProduct.cost, tblProduct.buyDate
    HAVING (((tblProduct.buyDate) Is Null));
    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
    chuki2 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    Selangor,Malaysia
    Posts
    26
    Thanks my friend.. It`s work!

    Hehe

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

Similar Threads

  1. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  2. Parameter Query....
    By Casper2012 in forum Queries
    Replies: 5
    Last Post: 08-16-2011, 11:06 AM
  3. Replies: 4
    Last Post: 01-06-2011, 10:52 AM
  4. Replies: 10
    Last Post: 09-27-2010, 08:06 PM
  5. Parameter Query help...
    By daggy in forum Queries
    Replies: 1
    Last Post: 05-11-2010, 01: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