Results 1 to 6 of 6
  1. #1
    phivosz is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2014

    #Type Error in report .. only in Print Preview

    Access 2010

    I have a report.. If I run the report everything works fine. If I Print Preview, one of the controls which is fine on screen displays a #Type error.

    I cannot see why this should be.

    The report is a statement of account.

    The contents of the offending control are the following:


    Text0 just counts the lines on the report
    Text9 subtracts the credits and adds debits on each line and is set to be summed overall (so it gives the running balance)

    Text35 takes the balance of all transactions falling before the first date of the period covered by the statement (from a subreport) and is added to the running balance only if Text0=1 (on the first line on the report).

    I really do not understand why there should be an error only in print preview (and Print) but the results display fine on screen.

    Any thoughts appreciated.



  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    put as much as you can in the query, you don't need to code in the report.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    How do you calculate Text0?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Ontario, Canada
    but the results display fine on screen.
    This means report view?
    If so, then I believe the answer to your musing is that in this view, the entire report is "available" to itself thus calculations can work but might not be when it's formatted for printing. Print Preview is just basically that, and whatever you see on screen should be the paper output, so if you're saying that this error is raised in either of these cases, then a calculated control's control source may not be available in preview. The entire report is apparently not "available" to itself. Not the best way to describe it I guess. You could try moving the control to a header or footer (page, report, or section). You didn't say where it was located.

    I also advocate doing as much of the calculation in a query, but sometimes it's just easier/better in a report - especially if it's a calculation over a group.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  5. #5
    phivosz is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2014
    June, [Text0] is an unbound textbox set to "=1". I set its "Running Sum" property to "Over All", which then gives my line numbers in the report.

  6. #6
    phivosz is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2014
    Micron, yes I mean report view is fine but print preview gives me the error.

    Anyway, I found a way around this. I removed the sub-report that was doing the calculation of the balance to be brought forward. Instead I write the value to a table and have the report read it from there. Problem solved. Well not "solved", avoided

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

Similar Threads

  1. Replies: 4
    Last Post: 11-01-2018, 11:22 AM
  2. Replies: 3
    Last Post: 04-28-2017, 09:51 AM
  3. Replies: 5
    Last Post: 08-06-2015, 03:26 PM
  4. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  5. Replies: 6
    Last Post: 03-01-2014, 07:07 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 - Senior Forums