timing problem recordset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After updating and closing a recordset I try to read the data from the table
into an Excel sheet through a quey. The data in the spreadsheet are not the
same as in the table.
The code is OK. If I go through it stepwise there is no problem and the
correct data are shown. It looks like the data in the Access table are not
yet updated.

How do I force the program to wait until the update of the table is finished ?

thanks in advance
 
Hi, Bram.
It looks like the data in the Access table are not
yet updated.

Try placing the DoEvents function in the code right after closing the
Recordset. If this doesn't seem to be enough "wait time," then try placing
one more DoEvents function after the update is finished, but before the
Recordset is closed, so that there are two chances to "finish up writing to
disk from the cache." If this doesn't help, you'll need to flush the cache
before running the query that exports to the Excel file.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.
 
Back
Top