Thanks for the input.
The data does not get changed the user plugs in values to view the report.
The preview allows the user to validate values on screen then print the
report. As it is now I have a preview then a print button that prints the
screen no problem. Unfortunatley the user wants to print directly from what
they see on the screen. When the report is printed it reruns the code within
the report and changes the input values. I need to figure out to stop the
code from running a second time, and just print what is there.
> The code is run a second time because the data may have changed between when
> you previewed it and when you printed it. To have the code run only once,
[quoted text clipped - 10 lines]
> > the code and then print the report with out running the code again. Any
> > advise would be greatly appreciated...
fredg - 12 Sep 2007 15:31 GMT
> Thanks for the input.
> The data does not get changed the user plugs in values to view the report.
[quoted text clipped - 19 lines]
>>> the code and then print the report with out running the code again. Any
>>> advise would be greatly appreciated...
If you want a specific answer you have to provide specific
information.
What is the code?. Where is it placed?
What is the Preview data?
What is the data when printed?

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
2005sporty - 12 Sep 2007 19:14 GMT
The code is a series of steps that calculates costs and budgets and year
allocated. I did not write it.The preview data is a report that gets
generated from the data calculated by the code. The data when printed is the
report. The code is based in a report and runs everytime it is previewed or
printed. The issue is the print preview report is the correct data, when it
is printed the code gets re-run and the data is incorrect, not the data in
the print preview.
> If you want a specific answer you have to provide specific
> information.
> What is the code?. Where is it placed?
> What is the Preview data?
> What is the data when printed?
fredg - 12 Sep 2007 21:46 GMT
> The code is a series of steps that calculates costs and budgets and year
> allocated. I did not write it.The preview data is a report that gets
[quoted text clipped - 8 lines]
>> What is the Preview data?
>> What is the data when printed?
It's like pulling teeth.
You just are not going to offer any constructive information.
Where (in what event) is this code placed?
What is the actual data supposed to be when Previewed?
What is the actual data when printed?
Is the printed data double the Preview value?
The data is computed when previewed then computed again when printed.
If so, I would guess that you have not re-set your controls value to 0
in the report Header Format event.
That's the best I can offer you on what you have posted.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
2005sporty - 12 Sep 2007 22:00 GMT
It looks as if you are correct I found one other person having this issue.
Here is what I am looking at
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
End Sub
> > The code is a series of steps that calculates costs and budgets and year
> > allocated. I did not write it.The preview data is a report that gets
[quoted text clipped - 23 lines]
>
> That's the best I can offer you on what you have posted.
Pat Hartman (MVP) - 13 Sep 2007 14:06 GMT
You cannot stop Access from recreating the report so if it is your code that
is causing the problem, you will need to modify the code so that it doesn't
come up with different values the second time it is run. As fredg as
suggested a couple of times, posting the code will likely get you a more
precise answer.
> Thanks for the input.
> The data does not get changed the user plugs in values to view the report.
[quoted text clipped - 26 lines]
>> > the code and then print the report with out running the code again. Any
>> > advise would be greatly appreciated...