Results 1 to 7 of 7
  1. #1
    Danr94 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2018
    Posts
    4

    Adding a calculated field to report

    I'm very new to Access and I'm having a very difficult time converting over from FileMaker Pro. It seems that Microsoft doesn't like making things easy! I'm trying to add a calculated field in a report. It's a simple If-Then statement :=IIf([WS Data]![Days Passed Sold]>10,"DSSM",IIf([WS Data]![Days Passed Sold]>5,"DSOM","WSA")) When I run the report I'm presented with a window titled "Enter Parameter Value" then below is the table name "WS Data" and below that the empty field. I have no idea what I'm supposed to enter so I enter nothing and click OK. When the report is displayed the field has the following error: #Type!. What does this mean? The WS Data is linked to an excel spreadsheet so adding a calculated field to the table is not an option (although I know if I added the same calculations to a field in the table, it would work - go figure). Any help here would be much appreciated. Thank you!

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Put the calculation into the reports underlying query. It's more efficient and easier to debug.
    I assume WS Data is joined to the other data in the query?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Danr94 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2018
    Posts
    4
    There are no queries. This is a very simple database with a letter and summary report in which the WS Data is used in both. The dealer data table is only used for addresses in the letter report. I probably don't use queries as much as I should. Should I create a query just for this field?
    Click image for larger version. 

Name:	ws access.PNG 
Views:	7 
Size:	8.1 KB 
ID:	32358

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Yes - press the builder ... on the datasource for the report.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    Danr94 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2018
    Posts
    4
    Thank you for you're help. It took me a while to figure it out but it works. The query doesn't show in the list. It must be saved within the report? Also, when I built the quiry I found that all the fields used in the report must be in the query. As I said, I'm new to this and I really appreciate your help!

  6. #6
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    You could use a saved query, but if you forget that that is being used for that report and change it you may break the report.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  7. #7
    Danr94 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2018
    Posts
    4
    Right! I've had that happen before, Thanks again for your help. I learned something today!

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

Similar Threads

  1. How to sum a calculated field on a report?
    By Athar Khan in forum Reports
    Replies: 1
    Last Post: 03-12-2017, 10:25 AM
  2. Adding a Calculated Date Field to a Query
    By MFriend in forum Access
    Replies: 8
    Last Post: 07-24-2015, 04:00 PM
  3. Sum of calculated field in report
    By whisp in forum Reports
    Replies: 5
    Last Post: 02-12-2015, 02:56 AM
  4. Sum calculated field on Report
    By 54.69.6d.20 in forum Reports
    Replies: 5
    Last Post: 06-19-2012, 02:27 PM
  5. Replies: 2
    Last Post: 12-03-2010, 09:33 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