Command button on report preview?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is is possible to put some type of command button somewhere in a report so
if I want to make adjustments/corrections to the underlying record before
printing I can click the button and return to the underlying form holding the
same data?

Thanks,
David
 
Yeahyeahyeah said:
Hi,

Is is possible to put some type of command button somewhere in a
report so if I want to make adjustments/corrections to the underlying
record before printing I can click the button and return to the
underlying form holding the same data?

Thanks,
David

No. A report preview is "just pixels".

Something in a menu or toolbar could be done though.
 
Hi Rick,

Thanks for responding. Is it possible to set something up in a toolbar that
would let me go directly back to the record data in the form view to do
adjustments?
 
Reports use a forward-scrolling recordset. There is no such thing as the
"current" record of the report. It will format whatever and whenever it
feels like, regardless of what page you are viewing.

If you want to mess with the idea, you could add this line to the General
Declarations section of the report's module (top, with the Option
statements):
Public mlngLastID As Long

Then in the Print event of the Detail section, assuming you have a primary
key field named "ID":
mlngLastID = Me.ID

Then in your toolbar button, assuming the report is named "Report1" you can
refer to the public variable in the module of the report like this:
Report_Report1.mlngLastID

Like I say though, there is no guarantee that the last section the report
"printed" is on the current page.
 
Back
Top