#error

  • Thread starter Thread starter Sherry
  • Start date Start date
S

Sherry

Working with subreports
On the main report I want to pass the value from the
subreport field in the sub report footer to the field in
the main report.
Sometimes the subreport value will not be there and I get
an #error.
How can I get the field on the main report to fill with a
0 if the field in the subreport is not there??

I acutually have several subreports, but if I can figure
this out for this one I'm sure it will work for the
rest. I have the same issues in forms, but a simple iff
statement worked.

Hair pulling and time consuming, any help will be
appreciated.
Thanks
Sherry
 
I don't understand... do you mean the field is not there or that there is no
/ Null value in the field... if it is a matter of Nulls, look at the NZ
(aka Null-to-Zero) function.

Larry Linson
Microsoft Access MVP
 
Thank you
Well the subreport I think the field (and it is a
calculated field)is null.
(the subreport will list all items that match the linking
fields, so I assume if there are no fields that match
then it is null?? To be more clear a customer is on the
main report and I have five subreports. One subreport
list part and or parts on order for the customer, one
subreport list service and or services performed for that
customer, one subreport list payment and or payments made
and so on. So any of the subreports can have no list,
can have one detail line or mutiple detail lines. SO I
really do not know if there is no list in that subreport
if the field is null or just not there.)

I have come to the NZ function, but can't figure out how
to use it. I still get the #error in the calculated
field on the main report. Do I use the NZ function in
the subreport on the field in the report footer or in the
field on the main report?

I also came across [HasData], what is this and how is it
used.

Thanks so much for your time
 
-----Original Message-----
Thank you
Well the subreport I think the field (and it is a
calculated field)is null.
(the subreport will list all items that match the linking
fields, so I assume if there are no fields that match
then it is null?? To be more clear a customer is on the
main report and I have five subreports. One subreport
list part and or parts on order for the customer, one
subreport list service and or services performed for that
customer, one subreport list payment and or payments made
and so on. So any of the subreports can have no list,
can have one detail line or mutiple detail lines. SO I
really do not know if there is no list in that subreport
if the field is null or just not there.)

I have come to the NZ function, but can't figure out how
to use it. I still get the #error in the calculated
field on the main report. Do I use the NZ function in
the subreport on the field in the report footer or in the
field on the main report?

I also came across [HasData], what is this and how is it
used.

Thanks so much for your time
-----Original Message-----
I don't understand... do you mean the field is not
there
or that there is no
/ Null value in the field... if it is a matter of
Nulls,
look at the NZ
(aka Null-to-Zero) function.

Larry Linson
Microsoft Access MVP




.
.
 
Yes, you are correct. Nothing is _equal_ to a Null, not even another
_Null_ -- because _Null_ indicates that it is undefined and no value exists.
And, if you use a Null anywhere in a calculation, the result is a Null --
for the same reason.

I'd guess, from your description, that the CustomerID or CustomerNumber on
the main report is used as the LinkMasterFields value for the Subreport
Control. I am assuming that you can NOT have a _Null_ identity for the
customer, so that it is the absence of data in the Report embedded in the
Subreport Control that is causing the problem. Is that correct?

Where/how are you copying the information from the Footer of the Report
embedded in the Subreport Control back to the main Report?

Larry Linson
Microsoft Access MVP


Thank you
Well the subreport I think the field (and it is a
calculated field)is null.
(the subreport will list all items that match the linking
fields, so I assume if there are no fields that match
then it is null?? To be more clear a customer is on the
main report and I have five subreports. One subreport
list part and or parts on order for the customer, one
subreport list service and or services performed for that
customer, one subreport list payment and or payments made
and so on. So any of the subreports can have no list,
can have one detail line or mutiple detail lines. SO I
really do not know if there is no list in that subreport
if the field is null or just not there.)

I have come to the NZ function, but can't figure out how
to use it. I still get the #error in the calculated
field on the main report. Do I use the NZ function in
the subreport on the field in the report footer or in the
field on the main report?

I also came across [HasData], what is this and how is it
used.

Thanks so much for your time
-----Original Message-----
I don't understand... do you mean the field is not there or that there is no
/ Null value in the field... if it is a matter of Nulls, look at the NZ
(aka Null-to-Zero) function.

Larry Linson
Microsoft Access MVP




.
 
Larry
Your response really had me thinking on the query and I
added a table with a one to many relationship so this
created a record for the customer even though there was
no data and that worked. God a situation like this is so
hair pulling and the sad part is been here before and
just did not remember.

Thanks so much for jarring my memory and your prompt
response. God bless all of you out there that help us
people out here that get in a rut.
Happy and safe holidays!

Thanks again so much.
Respectfully
Sherry Rumple
-----Original Message-----
Yes, you are correct. Nothing is _equal_ to a Null, not even another
_Null_ -- because _Null_ indicates that it is undefined and no value exists.
And, if you use a Null anywhere in a calculation, the result is a Null --
for the same reason.

I'd guess, from your description, that the CustomerID or CustomerNumber on
the main report is used as the LinkMasterFields value for the Subreport
Control. I am assuming that you can NOT have a _Null_ identity for the
customer, so that it is the absence of data in the Report embedded in the
Subreport Control that is causing the problem. Is that correct?

Where/how are you copying the information from the Footer of the Report
embedded in the Subreport Control back to the main Report?

Larry Linson
Microsoft Access MVP


Thank you
Well the subreport I think the field (and it is a
calculated field)is null.
(the subreport will list all items that match the linking
fields, so I assume if there are no fields that match
then it is null?? To be more clear a customer is on the
main report and I have five subreports. One subreport
list part and or parts on order for the customer, one
subreport list service and or services performed for that
customer, one subreport list payment and or payments made
and so on. So any of the subreports can have no list,
can have one detail line or mutiple detail lines. SO I
really do not know if there is no list in that subreport
if the field is null or just not there.)

I have come to the NZ function, but can't figure out how
to use it. I still get the #error in the calculated
field on the main report. Do I use the NZ function in
the subreport on the field in the report footer or in the
field on the main report?

I also came across [HasData], what is this and how is it
used.

Thanks so much for your time
-----Original Message-----
I don't understand... do you mean the field is not
there
or that there is no
/ Null value in the field... if it is a matter of
Nulls,
look at the NZ
(aka Null-to-Zero) function.

Larry Linson
Microsoft Access MVP

"Sherry" <[email protected]> wrote
in
message
Working with subreports
On the main report I want to pass the value from the
subreport field in the sub report footer to the
field
in
the main report.
Sometimes the subreport value will not be there and
I
get
an #error.
How can I get the field on the main report to fill with a
0 if the field in the subreport is not there??

I acutually have several subreports, but if I can figure
this out for this one I'm sure it will work for the
rest. I have the same issues in forms, but a simple iff
statement worked.

Hair pulling and time consuming, any help will be
appreciated.
Thanks
Sherry


.


.
 
Back
Top