View Full Version : Report Problem Error
BigBird 11-01-2007, 07:07 AM Guys,
I am completly confused with an error I am getting on one of MS Access 2007 templates, the Project Database one.
On the Project Task report, I have projects with a Zero (£0) cost and Zero Balance. The Report View display is correct, but when I print it the numbers are replaced by "#Error". I get the same with the Cost in Days fields, other numbers -ve or +ve show correctly.
I have a very limited knowledge of Access and even less when it comes to 2007.. so I would appreciate simple answers..!
Thanks in Advance..
BB
llkhoutx 11-01-2007, 01:07 PM "#Error" means the the control is not bound correctly to the report recordsource.
BigBird 11-06-2007, 12:46 AM Thanks for the pointer... could you suggest a method for 'binding' it to the report recordsource please...
BB..
boblarson 11-06-2007, 12:52 AM Welcome to Access World Forums...
Also, make sure that if any of those are calculated controls
for example: =[field1] + [field2] - [field3]
that your field names are not the same as the text boxes that those are bound to. So, field1 should have a text box like txtfield1 instead of just field1, and so on. Then, make sure to use the FIELD names in your calculations, not the text box names. Having fields with the same names as their text boxes when doing calculated controls will cause an #Error to appear.
llkhoutx 11-06-2007, 05:28 AM The control to be nound to the report recordsource should have a controlsource which is in the recordsource, e.g.
The recordsource has fields ID,A,B,C; the recport field control source should be one of those fields.
BigBird 11-14-2007, 09:07 AM Guys, all you have suggested to me so far seems to check out and I still ge the error message.. maybe I am missing something very obvious..
I have for the time being, entered data in to the Budget Fields and the Cost in Days field, and it prvents the error, I only get it when the calculated field shows a zero..
Your continued support is really appreciated..
Rabbie 11-14-2007, 09:11 AM When you get a zero are the fields you use to calculate this all set to zero or are some of them empty.
If so you will be using a Null which gives the error. Use the NZ function to view a null value as zero.
llkhoutx 11-14-2007, 10:00 AM change
for example: =[field1] + [field2] - [field3]
to
for example: =nz([field1]) + nz([field2]) - nz([field3])
A Null in any of the formula fields will cause this error. The NZ function converts Null to a numeric zero.
CraigDolphin 11-14-2007, 10:28 AM NZ function ...Numeric Zero
Aha! And all this time I was under the delusion that they named that function in honour of my homeland (New Zealand). ;)
llkhoutx 11-14-2007, 11:06 AM I remember you. Your the guy that does what some people dream of doing - watching the salmon climb a ladder.
CraigDolphin 11-14-2007, 01:44 PM More like digging into mud and muck to count/measure stinky clams ;)
I, of course, remember you since you're the one who introduced me to the wonderful world of form events and vba :)
BigBird 11-15-2007, 02:14 AM When you get a zero are the fields you use to calculate this all set to zero or are some of them empty.
If so you will be using a Null which gives the error. Use the NZ function to view a null value as zero.
Thanks for the reply..
When this occcurs, there are no records to set any vaules in the report for calculation. The database is the Projects Template from Microsoft; it takes a record [Project] and assigns values to that record, including Budget and Cost in Days. On a subform, tasks can then be assigned that have Budgets and Cost in Days. Those values are then rolled into the main report and taken from the original Budget and Cost in Days to demonstrate a saving or an overspend.
The MS Database has this error in it from the start..! download it and take a look..
BigBird 11-15-2007, 02:17 AM change
for example: =[field1] + [field2] - [field3]
to
for example: =nz([field1]) + nz([field2]) - nz([field3])
A Null in any of the formula fields will cause this error. The NZ function converts Null to a numeric zero.
Thanks for this.. tried it but I still get the error.. The vaules are ok until I send to print, both the Preview and the Print..
aaaah.. so frustrating..
Rabbie 11-15-2007, 02:48 AM Thanks for the reply..
When this occcurs, there are no records to set any vaules in the report for calculation. The database is the Projects Template from Microsoft; it takes a record [Project] and assigns values to that record, including Budget and Cost in Days. On a subform, tasks can then be assigned that have Budgets and Cost in Days. Those values are then rolled into the main report and taken from the original Budget and Cost in Days to demonstrate a saving or an overspend.
The MS Database has this error in it from the start..! download it and take a look..
Big Bird, I am sorry but my work rules do not allow me to download these files. I was just trying to help you and other people with a similar problem.
BigBird 11-15-2007, 02:57 AM Big Bird, I am sorry but my work rules do not allow me to download these files. I was just trying to help you and other people with a similar problem.
Rabbie, many thanks, I do appreciate it.. and understand that some companies wont allow dl's..
|