I have a report in MS Access where the underlying data in the tables changes irregularly. I'd like the report to reflect these changes automatically, either by reloading the form say every 10 seconds or either the report gets a notification about the changes and shows the new data. Is this possible?
+2
A:
The only way I can think of doing this is not elegant:
Create a hidden form with it's timer interval set to 10 seconds (or whatever interval you need). When the Forms' timer event fires, iterate through the open reports collection and close and re-open each one found.
Something along the lines of:
Public Sub RefreshOpenReports()
Dim rpt As Report
With Reports
' Iterate over all open reports...
For Each rpt In Reports
rpt.Requery
Next
End With
End Sub
Mitch Wheat
2008-11-05 08:51:45