Print Preview isn't what is printed

scotland

Registered User.
Local time
Yesterday, 21:50
Joined
Nov 2, 2006
Messages
12
Hi

I have attached a DB of mine which is a score grid. You select month and year from a form then it produces a report based on that month. All of this works briliantly (after a lot of work) in print preview mode. However when i actully print it all the data is replaced with the last record.

Why does it differ and how can i solve it?

Thanks is advance
 

Attachments

Is the form still open when you print?
 
yes, it loads it up in print preview mode which works fine, I click print and it jsu repeats the last record.

I think it is because the text boxes are not bound to fields but are made to equal the data during detail_print, as used here.

Thanks
 
Sorry to bring this up again but I really would like it sorted.

Anybody else got any ideas?

Cheers
 
points

I got an error for a missing reference when opening your form, but no matter. I have never tried printing a report with this format and code. Did you try using subreports instead? Atleast you would now have bound fields.
 
The referance required is probably DAO 3.6.

I dont think its possible using subreports as the query powering the report is a crosstab and so has varing numbers of colums, and the column names vary as well and so can't be bound.

Cheers
 
I'm having this same problem (sort of).

Try changing your code to this:

Code:
DoCmd.OpenReport stDocName, acViewNormal

From what I've read from other threads "Access actually processes the Report again (it does not use the Preview display)".

If you use the code above it will print properly (I downloaded yours and tried it).

I will let you know if I find out how to print it properly while it is print previewed.
 
Yes, I went through the Microsoft tutorial again.

I had missed out rstReport.MoveFirst from the report header. Which is needed because as you say the report is generated again but from where the recordset left off.

Thanks Anyway
 

Users who are viewing this thread

Back
Top Bottom