Results 1 to 4 of 4
  1. #1
    alexalodo is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2021
    Posts
    1

    Where did I go wrong in this formula?

    I'm trying to finish up an Access homework and so far have done okay, but now I'm stuck on a question because it asks me to enter a parameter value when there is no mention of parameter value in the instructions...What am I doing wrong this time? I shouldn't have to enter a "parameter value", the instructions don't mention parameter value, I think I did something wrong. Please help. Instructions and screenshot are included below.



    Instructions:
    Create a query in Query Design view based on both tables to answer the question, What is the Concert ID, Sponsor Name, Box Office Receipts, and a new field named Sponsor Donation that will calculate and display the donation amount when the Sponsor donates an amount equal to 50 percent (0.5) of each box office receipts amount to the Music Department. Sort the records in ascending order by the Concert ID field. a. Run the query (the second record—EVENT-102—has a Sponsor Donation of 287.5).


    I input concert ID, Sponsor name, box office receipts and I right clicked the next column to go into "Build" and I put in this: Sponsor Donation: [Amount]*0.5 then pressed OK, clicked run and this is the message that I get. I press cancel because I do not want to enter a parameter value, but it does nothing. Am I doing something wrong?

    Click image for larger version. 

Name:	Screenshot (314).png 
Views:	21 
Size:	120.7 KB 
ID:	45819

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    looks like you don't have a field called amount

  3. #3
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    What table is the field Amount in??

    Hint:
    ...display the donation amount when the Sponsor donates an amount equal to 50 percent (0.5) of each box office receipts amount ...


    Two other issues are
    1) "Date" is a reserved word in Access and shouldn't be used for object name.
    2) You have spaces in object names.



    And welcome to the forum....

  4. #4
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    213
    When you refer to a field name that is not defined in any of the sources, Access will ask you for a value for that field.

    In the fourth column, you have: [Amount] * 0.5

    but there is apparently no field named Amount in either of the source tables, so Access asks you what it should be. This is a feature, that you can set up a query that will collect information from tables or queries, and you can also enter an additional parameter manually. This allows you to make a query that can interact with the end user, or with code, if you call the query from VBA.

    You've hidden the Sponsors table behind the parameter request, so I can't guess what the field names there might be. What fields did you want to use to compute the Sponsors Donation value?

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

Similar Threads

  1. What is wrong with this formula?
    By yamalady in forum Access
    Replies: 7
    Last Post: 08-14-2019, 08:08 AM
  2. Replies: 19
    Last Post: 07-13-2015, 10:15 AM
  3. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  4. What am I doing wrong?
    By Access_noob_ in forum Programming
    Replies: 3
    Last Post: 11-03-2014, 10:47 AM
  5. VBA gone wrong with an if
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 10-21-2013, 05:38 PM

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