#Error

  • Thread starter Thread starter deepali jain
  • Start date Start date
D

deepali jain

I have developed a report based on a query . The problem is if there is
no records to be displayed on the reports it display #Error at that
place . I want to display "No Records" instead of #Error . The problem
occurs when my unbound controls is doing some calculation or validation
.. Like summation ,etc.
Please help me out i am stuck and i am a newbie in this field
Any kind of help woyld be appreciated
 
I have tried that too but the problem is i am displaying the report in
snapshot viewer through my MFC application and i am using automation
for that purpose
and in that case i am not able to view any messages
 
If I understand correctly you have fields that may not contain data, while
other fields in the same record do contain data. If so, take a lookat the
Nz function (see Help for more information). The control source for a text
box on the report may be something like:
=Nz([YourField],"No Records")
You can use the same expression in a new query field (the top of an empty
column in query design view):
NewField: Nz([YourField],"No Records")
Substitute your actual field name, of course, and call NewField whatever you
like. Bind a text box on the report to NewField.
 
BruceM said:
If I understand correctly you have fields that may not contain data, while
other fields in the same record do contain data. If so, take a lookat the
Nz function (see Help for more information). The control source for a text
box on the report may be something like:
=Nz([YourField],"No Records")
You can use the same expression in a new query field (the top of an empty
column in query design view):
NewField: Nz([YourField],"No Records")
Substitute your actual field name, of course, and call NewField whatever you
like. Bind a text box on the report to NewField.

deepali jain said:
I have tried that too but the problem is i am displaying the report in
snapshot viewer through my MFC application and i am using automation
for that purpose
and in that case i am not able to view any messages

Thanks for the reply sir
but this is not solving my problem i am still receiving # Error
If my control source consist of integer values or some summation
functions than i am receiving this value . I have tried iif statment
too but that is not giving me the proper result
Please help me out .
 
Does #Error appear all the time, or only on some records? If the report is
based on a query, do you see the correct values if you view the query
directly? Whether or not the record source is a query, what functions are
producing the error, and under what circumstances? What happens if you make
a new text box and bind it to one of the integer fields that is producing
the error?

deepali jain said:
If I understand correctly you have fields that may not contain data,
while
other fields in the same record do contain data. If so, take a lookat
the
Nz function (see Help for more information). The control source for a
text
box on the report may be something like:
=Nz([YourField],"No Records")
You can use the same expression in a new query field (the top of an empty
column in query design view):
NewField: Nz([YourField],"No Records")
Substitute your actual field name, of course, and call NewField whatever
you
like. Bind a text box on the report to NewField.

deepali jain said:
deepali jain wrote:

Brendan Reynolds wrote:

You can use the report's NoData event procedure to display a message
and
cancel the opening of the report. Here's a link to an on-line help
topic
that shows how to do this ...

http://office.microsoft.com/assistance/hfws.aspx?AssetID=HP051874191033

--
Brendan Reynolds
Access MVP


I have developed a report based on a query . The problem is if
there
is
no records to be displayed on the reports it display #Error at
that
place . I want to display "No Records" instead of #Error . The
problem
occurs when my unbound controls is doing some calculation or
validation
. Like summation ,etc.
Please help me out i am stuck and i am a newbie in this field
Any kind of help woyld be appreciated


I have tried that too but the problem is i am displaying the report in
snapshot viewer through my MFC application and i am using automation
for that purpose
and in that case i am not able to view any messages

Thanks for the reply sir
but this is not solving my problem i am still receiving # Error
If my control source consist of integer values or some summation
functions than i am receiving this value . I have tried iif statment
too but that is not giving me the proper result
Please help me out .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top