Results 1 to 2 of 2

Thread: Please Help! DoEvents

  1. #1
    Guest

    Smile

    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.....

  2. #2
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    if you only need to achieve a 'delay', use the Timer() function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width