I have some users who have a problem leaving a report opened in Preview mode overnight. Trying to tell them not to do that is like talking to a brick wall sometimes. So what I want to do is have the report close the preview window after a specific amount of time. Can this be done when a report is opened in preview mode? This is how I open the report from my form. This form does stay open but in hidden mode until the user actually closes the report. Then the form is unhidden and they can then close the form also. I want to put a timer on the report so it closes after 5 minutes. So how can I set this up on my report?
Here is the code that opens the report from a command button on my form:
Dim stDocName As String TempVars.Add "strBOForm", Me.Name stDocName = Me.cboReport DoCmd.OpenReport stDocName, acPreview DoCmd.RunCommand acCmdFitToWindow Me.Visible = False