Results 1 to 4 of 4
  1. #1
    luckysarea is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    8

    Question Parameter Query?

    Hi, I need some help.



    I have generated a query based on another query. Here is the query i have made:


    The Query consists of only these four fields. The custom field PER DAY PAYMENT CAPACITY is based on the expression :
    Per Day Payment Capacity: [AvgOfFine Silver Charged And Fully Paid For]/[AvgOfFull Payment Period]

    Now when i run this query, it acts as a parameter query. Two msg box appear one after the other asking me to input values for "AvgOfFine Silver Charged And Fully Paid For" and AvgOfFull Payment Period.

    I have matched the names of the field with the names in the expression, they both are same. I have even inserted the names through the Expression Builder.

    why is this happening?

    Thanx in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    It has to do with the order the clauses are evaluated in. You need to group by the expression rather than the alias:

    SELECT...
    FROM...
    GROUP BY Avg(OriginalFieldName)/Avg(OtherFieldName)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    luckysarea is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    8

    Thumbs up Thanx!!

    Quote Originally Posted by pbaldy View Post
    It has to do with the order the clauses are evaluated in. You need to group by the expression rather than the alias:

    SELECT...
    FROM...
    GROUP BY Avg(OriginalFieldName)/Avg(OtherFieldName)
    Thank you!! My query is working fine now.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How to run parameter query from VBA
    By John Southern in forum Programming
    Replies: 10
    Last Post: 02-07-2014, 02:24 PM
  2. Parameter Query with Combobox?
    By Krs13 in forum Forms
    Replies: 3
    Last Post: 12-21-2010, 06:15 AM
  3. Parameter query
    By doss13 in forum Queries
    Replies: 1
    Last Post: 06-26-2010, 06:11 AM
  4. Parameter Query help...
    By daggy in forum Queries
    Replies: 1
    Last Post: 05-11-2010, 01:10 AM
  5. Parameter in Crosstab Query
    By RandyG in forum Queries
    Replies: 4
    Last Post: 09-30-2009, 06:40 AM

Tags for this Thread

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