Error "The expression On Print..."

G

Guest

I have a report that I am accessing by pushing a button on a form.

When I try to move to the second page, I get the following message:

The expression On Print you entered as the event property setting produced
the following error:
Procedure declaration does not match description of event or procedure
having the same name.

* The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure],

* There may have been an error evaluating the function, event, or macro.


Any idea where the expression "On Print" might be located? I've looked in
every property box I can think of, and the code for the button.

Thanks.
 
G

Guest

Hi.
Any idea where the expression "On Print" might be located?

Every section of the report has an "OnPrint" event available. Open the
report in Design View and open the Properties dialog window. Select the
"Event" tab, then select the Report Header/Footer sections, Page
Header/Footer sections, Group Header/Footer sections, and the Detail section.
At least one of them has an "OnPrint" Property with "[Event Property]"
listed in the Properties dialog window. It either needs to be modified or
deleted in the report's module so that the formal parameters match this
syntax:

Private Sub XXX_Print(Cancel As Integer, PrintCount As Integer)

.... where XXX is the name of the section. If you can't find the error and
have subreports, then don't forget to check their sections, too, to ensure
they comply.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.


r. howell said:
I have a report that I am accessing by pushing a button on a form.

When I try to move to the second page, I get the following message:

The expression On Print you entered as the event property setting produced
the following error:
Procedure declaration does not match description of event or procedure
having the same name.

* The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure],

* There may have been an error evaluating the function, event, or macro.


Any idea where the expression "On Print" might be located? I've looked in
every property box I can think of, and the code for the button.

Thanks.
 
G

Guest

Many, many thanks. This helped me fix the problem.

'69 Camaro said:
Hi.
Any idea where the expression "On Print" might be located?

Every section of the report has an "OnPrint" event available. Open the
report in Design View and open the Properties dialog window. Select the
"Event" tab, then select the Report Header/Footer sections, Page
Header/Footer sections, Group Header/Footer sections, and the Detail section.
At least one of them has an "OnPrint" Property with "[Event Property]"
listed in the Properties dialog window. It either needs to be modified or
deleted in the report's module so that the formal parameters match this
syntax:

Private Sub XXX_Print(Cancel As Integer, PrintCount As Integer)

... where XXX is the name of the section. If you can't find the error and
have subreports, then don't forget to check their sections, too, to ensure
they comply.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.


r. howell said:
I have a report that I am accessing by pushing a button on a form.

When I try to move to the second page, I get the following message:

The expression On Print you entered as the event property setting produced
the following error:
Procedure declaration does not match description of event or procedure
having the same name.

* The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure],

* There may have been an error evaluating the function, event, or macro.


Any idea where the expression "On Print" might be located? I've looked in
every property box I can think of, and the code for the button.

Thanks.
 
6

'69 Camaro

You're welcome! Glad to help.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.


r. howell said:
Many, many thanks. This helped me fix the problem.

'69 Camaro said:
Hi.
Any idea where the expression "On Print" might be located?

Every section of the report has an "OnPrint" event available. Open the
report in Design View and open the Properties dialog window. Select the
"Event" tab, then select the Report Header/Footer sections, Page
Header/Footer sections, Group Header/Footer sections, and the Detail
section.
At least one of them has an "OnPrint" Property with "[Event Property]"
listed in the Properties dialog window. It either needs to be modified
or
deleted in the report's module so that the formal parameters match this
syntax:

Private Sub XXX_Print(Cancel As Integer, PrintCount As Integer)

... where XXX is the name of the section. If you can't find the error
and
have subreports, then don't forget to check their sections, too, to
ensure
they comply.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message
will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the
question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember
that
questions answered the quickest are often from those who have a history
of
rewarding the contributors who have taken the time to answer questions
correctly.


r. howell said:
I have a report that I am accessing by pushing a button on a form.

When I try to move to the second page, I get the following message:

The expression On Print you entered as the event property setting
produced
the following error:
Procedure declaration does not match description of event or procedure
having the same name.

* The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure],

* There may have been an error evaluating the function, event, or
macro.


Any idea where the expression "On Print" might be located? I've looked
in
every property box I can think of, and the code for the button.

Thanks.
 

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