473,387 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to use a custom error message instead of Error#

I have a report that I run which consists of two subreports.
Occasionally, one or the other reports do not have valid recordsets due
to a parameter query based on date.

Right now, if there are no records that match that date, I get the
generic "Error#" message. I want the report to go ahead and print even
if there are no records. Is there any way to have the "error#" message
read "No loads for today" intead?

Report Name: rptOutboundAlex-ByDate
Fields queried on the report: ShipDate, DestinationID, VendorPO,
ProductTypes, ProductForm, Carrier, CarrierPO, Notes

Thanks,
Carla

Nov 13 '05 #1
1 1436
Hers2keep wrote:
I have a report that I run which consists of two subreports.
Occasionally, one or the other reports do not have valid recordsets due
to a parameter query based on date.

Right now, if there are no records that match that date, I get the
generic "Error#" message. I want the report to go ahead and print even
if there are no records. Is there any way to have the "error#" message
read "No loads for today" intead?

Report Name: rptOutboundAlex-ByDate
Fields queried on the report: ShipDate, DestinationID, VendorPO,
ProductTypes, ProductForm, Carrier, CarrierPO, Notes


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In the report's module, in the section that holds the subreport, check
if the subreport has data. If not, hide the subreport. Underneath the
subreport put a label with a .Caption property of "No loads for today."

Example (the subreport is in the Detail section):

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

subReportName.Visible = (subReportName.Report.HasData = True)

End Sub

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQiywVYechKqOuFEgEQJybwCfVQGmdmr/ch5pNurlZFAvNknMhl4AnRNP
kw+YC+xZJJbqB6rL+SGLGp2E
=jxsG
-----END PGP SIGNATURE-----
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
6
by: dee | last post by:
Hi In web.config I have to the following: <configuration> <system.web> <customErrors defaultRedirect="error.htm" mode="On" /> </system.web> </configuration>
4
by: Pat | last post by:
In my Web.config i have :- <customErrors mode="On" defaultRedirect="genericerror.htm"> <error statusCode="404" redirect="pagenotfound.aspx"/> </customErrors to get page not found error but...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.