help in report viewing

R

Renato Bacani

i made a dbase for students,what i want to do is that every changes i made in
the form will be automatically displayed when i click the report preview
button..what coding should i do?..thanks
 
S

Stefan Hoffmann

hi Renato,

Renato said:
i made a dbase for students,what i want to do is that every changes i made in
the form will be automatically displayed when i click the report preview
button..what coding should i do?..thanks
You need to save the changes before viewing your report. If you are
using a macro, switch to an event procedure like that:

Private Sub cmdShowReport_Click()

On Local Error Goto LocalError

If Dirty Then Dirty = False

DoCmd.OpenReport "YourReport", acViewPreview

Exit Sub

LocalError:
MsgBox Err.Description

End Sub


mfG
--> stefan <--
 
Top