I have an Access 97 database I've inherited where 'problems' are being created by people opening reports & then leaving these open (while they go off for lunch).
Whilst I sort out the intrinsic problems with this DB (ie rewrite from scratch) does anybody know of a way of getting a report to close after a suitable time lapse (say 5 minutes)?
My first try was along the lines of:
Private Sub Report_Open(Cancel As Integer)
Dim sec
sec = Timer
Do
If Timer - sec > 300 Then
DoCmd.Close acReport, "Main Data Query", acSaveNo
End If
Loop
End Sub
The problem here is the report never actually opens (which does sort of make sense).
Any ideas? Thanks in advance.
Whilst I sort out the intrinsic problems with this DB (ie rewrite from scratch) does anybody know of a way of getting a report to close after a suitable time lapse (say 5 minutes)?
My first try was along the lines of:
Private Sub Report_Open(Cancel As Integer)
Dim sec
sec = Timer
Do
If Timer - sec > 300 Then
DoCmd.Close acReport, "Main Data Query", acSaveNo
End If
Loop
End Sub
The problem here is the report never actually opens (which does sort of make sense).
Any ideas? Thanks in advance.