Procedure Variable Value

  • Thread starter Thread starter bw
  • Start date Start date
B

bw

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
ls_DetailOnPrint Me 'Label Saver
End Sub

I open my file "A2002 Labels".
When I run my report, the above procedure gets executed two times the FIRST
TIME I run the report, and it gets executed only once on subsequent runs.

This happens each time I open the file.

The value of "PrintCount" has a value of 1 or 2 depending on the number of
times the procedure gets executed.

So where/how does PrintCount get it's value? Is there a way for me to find
out how and why this procedure is getting executed twice ONLY when I run the
report for the first time?

I know there is not much information here, but maybe someone has an idea of
how you or I can help myself figure out whats going on here...

Thanks,
Bernie
 
bw said:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
ls_DetailOnPrint Me 'Label Saver
End Sub

I open my file "A2002 Labels".
When I run my report, the above procedure gets executed two times the FIRST
TIME I run the report, and it gets executed only once on subsequent runs.

This happens each time I open the file.

The value of "PrintCount" has a value of 1 or 2 depending on the number of
times the procedure gets executed.

So where/how does PrintCount get it's value? Is there a way for me to find
out how and why this procedure is getting executed twice ONLY when I run the
report for the first time?

I know there is not much information here, but maybe someone has an idea of
how you or I can help myself figure out whats going on here...


The events in a report are executed as many times in
whatever order Access needs to construct the output. The
FormatCount and PrintCount values are not quite what you
might think they are and are only useful in special, very
rigorous situations.

If you'll explain what you're trying to accomplish, perhaps
someone will be able to suggest an alternate approach.
 
Thanks Marshall,

At this point, I can't provide you with any other information, including
what I'm trying to accomplish.

If someone would be interested in looking at the file, I'd be happy to send
it to whomever may help figure out what's happening. I just can't see what
is causing the problem.

My Access file is 1652 KB in size. If you'd like to take a look, please let
me know and I'll be happy to send it in hopes you can debug the problem.

I should probably explain that part of the code here comes from "Peter's
Software" called "Label Saver" (a really cool application that I have been
using for sometime now), that allows for printing a label a specified number
of times, from a specified start position.

My file has two reports in it (different size labels)...one works as it
should, the other doesn't.

If you want to help figure this out, please email me directly if you like
(iamnubw@gmail.com), and indicate how you want me to send you the file.

I'd prefer to keep things visible to the group, so that others may learn if
we determine that a solution may help others.

Thanks for your help,
Bernie
 
I am not familiar with that procedure, not am I a label
making wyzard ;-) So, having me look at your file
wouldn't really help you. All I can say is, if that
procedure depends on being executed exactly one time,
then there is something wrong with it.

I suggest that you start a new thread by rephrasing your
question in terms of the original problem you're trying to
solve instead of your difficulties in using someone else's
code.
 
Okay, Marshall, thanks anyway.

I don't really think the problem is with the Label Saver code, and it does
not depend on being executed only once. I'll see if anyone else would be
interested in trying to solve this problem, and if not, I'll try a new
thread sometime in the future.

Again, Thanks for you help/advice.
Bernie


Marshall Barton said:
I am not familiar with that procedure, not am I a label
making wyzard ;-) So, having me look at your file
wouldn't really help you. All I can say is, if that
procedure depends on being executed exactly one time,
then there is something wrong with it.

I suggest that you start a new thread by rephrasing your
question in terms of the original problem you're trying to
solve instead of your difficulties in using someone else's
code.
--
Marsh
MVP [MS Access]

Thanks Marshall,

At this point, I can't provide you with any other information, including
what I'm trying to accomplish.

If someone would be interested in looking at the file, I'd be happy to
send
it to whomever may help figure out what's happening. I just can't see
what
is causing the problem.

My Access file is 1652 KB in size. If you'd like to take a look, please
let
me know and I'll be happy to send it in hopes you can debug the problem.

I should probably explain that part of the code here comes from "Peter's
Software" called "Label Saver" (a really cool application that I have been
using for sometime now), that allows for printing a label a specified
number
of times, from a specified start position.

My file has two reports in it (different size labels)...one works as it
should, the other doesn't.

If you want to help figure this out, please email me directly if you like
(iamnubw@gmail.com), and indicate how you want me to send you the file.

I'd prefer to keep things visible to the group, so that others may learn
if
we determine that a solution may help others.
 
Back
Top