PDA

Click to See Complete Forum and Search --> : Please Help! DoEvents


Jun 16th, 2000, 07:44 AM
Hi, I am working on an application that does importing and exporting tables between two Acces2000 databases. I have a problem when I try to import/export. EX. There are 5 tables that need to import to a master database, VB6 suppose to read data off from these tables and put it into a form. All these processes are done in a function. My problem is that I must insert a FOR loop of DoEvents to wait the import process to complete before I could send information to the form. Is there a better way to detect the import process? Thanks in advance :)

Here is part of my code for importData...
with AccessApp
.DoCmd.TransferDatabase acExport, "Microsoft Access", _
strPathFileName & strFileName & ".mdb", acTable, "Investigator Info", "Investigator Info"
.DoCmd.TransferDatabase acExport, "Microsoft Access", _
strPathFileName & strFileName & ".mdb", acTable, "Room Info", "Room Info"
.DoCmd.TransferDatabase acExport, "Microsoft Access", _
strPathFileName & strFileName & ".mdb", acTable, "Seized Item Info", "Seized Item Info"
.DoCmd.TransferDatabase acExport, "Microsoft Access", _
strPathFileName & strFileName & ".mdb", acTable, "Site Identification Info", "Site Identification Info"
.DoCmd.TransferDatabase acExport, "Microsoft Access", _
strPathFileName & strFileName & ".mdb", acTable, "Time Progress Info", "Time Progress Info"
End With

For i = 0 To 80000
DoEvents
Next i

'Send information to the form.....

pardede
Jun 17th, 2000, 04:55 AM
if you only need to achieve a 'delay', use the Timer() function.