Multithreading in MS Access, asynchronous processing

I know the name sounds crazy, but here is my situation.

After a specific user event, I need to update a couple of tables that are β€œunrelated” to what the user is currently doing. Currently, it takes a couple of seconds to complete and causes the user a certain amount of disappointment. Is there a way to perform my upgrade in the second process, or in a way that does not β€œfreeze” the user interface of my application while it is processing?

thank

+5
source share
3 answers

. , .

, MS Access .

, , MS Access , .

DAO , . , ODBC .

2

ODBC, ADO, . , OTTOMH.

dim myConn as ADODB.Connection
dim myCmd as ADODB.Command

set myConn = new ADODB.Connection
myConn.ConnectionString = "Provider=SQLOLEDB;Server=MyServerName;Initial Catalog=MyCatalogName;UID='XXX';PWD='YYY'"
myConn.Open

set myCmd =  new ADODB.Command (myConn)
myCmd.SQL = "Update MyTable Set MyColumn = '" & MyDataVariable & "' Where MyPK = '" & MyPKVariable & "'"
myCmd.Execute

myCmd.close
myConn.close
+3

, ? , , . .

Shell("'C:\Reports\SomeOtherAccessDB.MDB' /x 'SomeMacro'", 1)

, .mdb , .

, Kudos , !

+1

docmd.hourglass true docmd.hourglass false , curasor . docmd.hourglass false .

, .

0

All Articles