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-----