Hi Jagan
I presume you mean the Reports Preview screen??
Firstly, I do not know of any way to globally set this behaviour
Secondly, I can't understand why you would want to do this.? If a report is being previewed and can't be closed, then what is the good of that?
Nevertheless, I have tried to emulate this behaviour with code. First I tried to re-open the report on the Deactivate event
- Private Sub Report_Deactivate()
-
DoCmd.OpenReport "Overdue Sales Orders", acViewPreview
-
End Sub
Curiously, this works once. The second time you try the the report closes.
Next I checked 'Close Button = No' in report Format properties. This seems to give the effect you wanted.
Finally, I tried to set this property using code in the On_Open event (where you made have made it conditional should you ever want to)
Howevr, Access would not allow this property to be set at runtime.
S7