2
由于我处于开发模式,我的前端需要大量更新。 这是我的功能检查版本,当用户试图在前端的开口道:计时器每30分钟运行一次代码
Public Function FEPath(DBName As String)
Dim Conn As New ADODB.Connection
Dim DataConn As New ADODB.Recordset
Dim Comm As String
Dim strPath As String
Dim strDB As String
Dim strVer As String
Dim strExt As String
Comm = " SELECT tblFE.Database, tblFE.Version, tblFE.Extension " & _
" FROM tblFE WHERE tblFE.[Database] = '" & DBName & "';"
Set Conn = CurrentProject.Connection
DataConn.Open Comm, Conn, adOpenKeyset, adLockOptimistic
With DataConn
strDB = ![Database]
strVer = ![Version]
strExt = ![Extension]
strPath = "C:\Databases\" & strDB & " " & strVer & strExt
.Close
End With
Set Conn = Nothing
我需要以某种方式运行一块每30分钟的代码,而前端是开放的,以检查以查看是否有可用于上传的新前端版本。然后我会通知用户,关闭数据库并更新到新版本。现在,版本更新总是在数据库打开时发生。如何才能做到这一点?
谢谢。