Event Procedure

G

Greg

I am not knowledgeable about VB or event procedures.

I am trying to learn.

I have created a report based upon a query. Occasionally the query will
produce no output and the report based upon this query does not look good.

I put a Label on the Report saying " NO DATA AVAILABLE" and I set this Label
option to visible=No via the properties list.

Now I want to set the "No Data" event for the report to a procedure that
will make my hidden " not visible" Label to Visible.

When I go to the properties window for the report, I go to the "No Data"
option and click the event procedure access automatically creates a private
type subroutine

SUB Report_NoData(Cancel as Integer)
lblNoDatatoReport.Visible = True
End Sub

This does not work. I am getting some compiler error.

What do I enter on the "No Data" property to link to the SUB? Do I leave
blank, do I enter "Report_No Data" or do I enter "Report_No Data( )".

Nothing seems to work.

Thank You in advance!

Greg
 
F

fredg

I am not knowledgeable about VB or event procedures.

I am trying to learn.

I have created a report based upon a query. Occasionally the query will
produce no output and the report based upon this query does not look good.

I put a Label on the Report saying " NO DATA AVAILABLE" and I set this Label
option to visible=No via the properties list.

Now I want to set the "No Data" event for the report to a procedure that
will make my hidden " not visible" Label to Visible.

When I go to the properties window for the report, I go to the "No Data"
option and click the event procedure access automatically creates a private
type subroutine

SUB Report_NoData(Cancel as Integer)
lblNoDatatoReport.Visible = True
End Sub

This does not work. I am getting some compiler error.

What do I enter on the "No Data" property to link to the SUB? Do I leave
blank, do I enter "Report_No Data" or do I enter "Report_No Data( )".

Nothing seems to work.

Thank You in advance!

Greg

Is "lblNoDatatoReport" the actual name of that label?
That compiler error should be giving you some information. Care to
share "What" that error says and, if there is one, the error number?
 
M

Maverick

You may need to call your procedure when the subreport loads. It should be
looking if a certain field is null and if so, then you would set the label to
visible. Of course, you may want the code to set other things on your report
to not visible as well in order to clean it up a bit.
 

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

Top