Solved

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

Posted on 2014-02-28
13
368 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
  • 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 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

776 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