Option Update

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

First I have a main form / subform I enter data into. Then I run another
form that is an options group that selects reports for printing / preview.
Upon pressing the print command button on that form I get this:

Private Sub previewreportsbutton_Click()
previewrpt acNormal
End Sub

that goes to this:

Sub previewrpt(EditMode As Integer)
On Error GoTo Err_Preview1_Click
Select Case Me!previewreports
Case 1
DoCmd.OpenReport "rptchecklisting", acViewPreview
etc...

If I make changes in the main entry form that this report represents,
changes / updates don't seem to appear right away on the report. Is there a
setting so when I display / print the above report I know it has the newest
data?

thanks.
 
rob said:
First I have a main form / subform I enter data into. Then I run another
form that is an options group that selects reports for printing / preview.
Upon pressing the print command button on that form I get this:

Private Sub previewreportsbutton_Click()
previewrpt acNormal
End Sub

that goes to this:

Sub previewrpt(EditMode As Integer)
On Error GoTo Err_Preview1_Click
Select Case Me!previewreports
Case 1
DoCmd.OpenReport "rptchecklisting", acViewPreview
etc...

If I make changes in the main entry form that this report represents,
changes / updates don't seem to appear right away on the report. Is there a
setting so when I display / print the above report I know it has the newest
data?


Sorry, but I don't follow that code. If your question is
how to get the report to reflect the newly entered data on
the form, then the answer is to save the data before running
the report. I think all you need is to change the
previewreportsbutton_Click procedure to:

If Me.Dirty THen Me.Dirty = False
previewrpt acNormal
 
Back
Top