Option Compare Database
Sub RunTest()
Call autoexec
End Sub
Function autoexec()
On Error GoTo autoexec_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "delete alerttest", acViewNormal, acEdit
DoCmd.OpenQuery "alerttestquery", acViewNormal, acEdit
DoCmd.OpenQuery "alerttestdatequery", acViewNormal, acEdit
DoCmd.OpenQuery "namequery", acViewNormal, acEdit
DoCmd.OpenQuery "timediffquery", acViewNormal, acEdit
DoCmd.OpenTable "alerttest", acViewNormal, acEdit
autoexec_Exit:
Exit Function
autoexec_Err:
MsgBox Error$
Resume autoexec_Exit
Application.OnTime Now + TimeValue("00:00:10"), "RunTest"
End Function
在Application.OnTime上获取编译错误可以问为什么?
答案 0 :(得分:0)
因为<MultiBinding Converter="{StaticResource UnitConverter}">
<Binding Path="C"/>
<Binding Path="D"/>
</MultiBinding>
仅存在于Excel VBA中。
您需要将表单与其Application.OnTime
事件一起使用,将OnTimer
属性设置为10000毫秒。
如有必要,可隐藏表格。