Option Update

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.
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top