Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 MS Access 中有一份报告,其中表中的基础数据不规则地变化。我希望报告自动反映这些更改,方法是每 10 秒重新加载一次表单,或者报告收到有关更改的通知并显示新数据。这可能吗?
我能想到的唯一方法并不优雅:
创建一个隐藏表单,将其计时器间隔设置为 10 秒(或您需要的任何间隔)。当 Forms 的计时器事件触发时,遍历打开的报告集合并关闭并重新打开找到的每个报告。
类似于以下内容:
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