Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access07 - Report - Unbound textbox in Report Footer #Error but when in layout view it's not

Posted on 2014-02-28
13
Medium Priority
?
373 Views
Last Modified: 2014-02-28
Hello all

Been away a few day.

I have a "Report" that I designed that when I'm in Preview or Form view mode an unbound Textbox shows me the total from it's control source formula...


However, when I "Preview" the form I'm getting #Error......  Is there a 07 bug or am I missing something??????
0
Comment
Question by:wlwebb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39895923
What is the control source of the unbound textbox?
0
 

Author Comment

by:wlwebb
ID: 39895953
Mbiz

=[txtEOD1]+[txtAtLastPull1]+[txtAtCurrPull1]

those three textboxes are in the Report footer as well.  Individually they all show amts.... but when I add them in the other textbox #error (if I put them in the control source of one textbox as a formula I get #Error)
=[sRpt_MachPull_ReconcileEOD].[Report]![txtEODSincePullTtl1]
=[sRpt_MachPull_ReconcileLastPull].[Report]![txtAtLastPullTtl1]
=[sRpt_MachPull_ReconcileCurrentPullTime].[Report]![txtAtCurrentPullTtl1]
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39895985
Any chance of seeing a sample copy of your database?

<<   =[txtEOD1]+[txtAtLastPull1]+[txtAtCurrPull1]    >>

You might have to replace those textbox names with their equivalent expressions based on the underlying table fields.

As to why it would fail in Print Preview... it may have to do with the timing of when those textboxes are available.  For example controls in the detail section of a report are not available until the Detail Print or Detail format events.

(But I'm just speculating here.)
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:wlwebb
ID: 39895995
Stripping out a small version might be next to impossible......and whole I think will be too large to upload...

The timing is the conclusion I was coming up with too........  

I will see if I can whittle the db down for upload
0
 

Author Comment

by:wlwebb
ID: 39896009
Two parts FE/BE.... the Report is rpt_MachPull

BUT before you open that in forms... open frm_AAASetVariables

and put in an EmpID=2 ShiftID=39 UserID=2 and Date 1/2/14
LVL-Reporting.accdb
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39896012
You can also try replacing those textbox names with expressions based on the actual fields.

Depending on how the report is configured (main report, subreports, etc) you may need to use DLookups or similar to get the needed fields.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39896016
Missed your last post.  I'll take a look.
0
 

Author Comment

by:wlwebb
ID: 39896021
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39896120
OK...

All of those "Text7" texboxes need their control sources changed so that they are using fields from the cross tab query as opposed to the textboxes on the previous subform.

This is an example of how ONE of them works:

=DSum("[1]","Ctabqry_LVLInfoDetails_CurrentPull","BusDay = #" & [BusDay] & "#")

Give it a try for the others....

Once you have those Text7's working properly, I  *think* the other totals will fall into place.
0
 

Author Comment

by:wlwebb
ID: 39896167
Thx.... I'll give it a try
0
 

Author Comment

by:wlwebb
ID: 39896276
Get #Error on my
=IIf(IsError(DSum("[1]","Ctabqry_LVLInfoDetailEODSinceLastPulll","BusDay<=#" & [BusDay] & "#")),0,DSum("[1]","Ctabqry_LVLInfoDetailEODSinceLastPull","BusDay<=#" & [BusDay] & "#"))

And on

=IIf(IsError(DSum("[1]","Ctabqry_LVLInfoDetails_AtLastPullTime","MaxBusDay=#" & [BusDay] & "#")),0,DSum("[1]","Ctabqry_LVLInfoDetails_AtLastPullTime","MaxBusDay=#" & [BusDay] & "#"))

I added [BusDay] field in header of rpt_MachPull................

Tried both without the [] around the 1 also... same result
0
 

Author Closing Comment

by:wlwebb
ID: 39896344
THANKS!!!!  (I had a space in front of the number in the [] was causing the error.......)
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39896386
Nice job!  :)
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question