need updated table after querydefs

  • Thread starter Thread starter R. Choate
  • Start date Start date
R

R. Choate

Using code, I run 2 append queries set up as querydefs in one sub. In my
next sub, I run a SQL which pulls all of the data from the table that just
got loaded by the 2 append queries. However, when I run the subs back to
back, I don't get all the records. The records from the 2nd append query
don't get included. If I run each sub from the VB editor, with a few seconds
between the 1st sub and 2nd sub, it gives me all the records. What can I do
to fix this?
 
If you use DAO, add the statement:

DBEngine.Idle dbRefreshCache

after the coe to run the 2 Append Queries to make sure
Records are actually appended into the Table(s) rather
than still pending in cache.

HTH
Van T. Dinh
MVP (Access)
 
Thank you, Van. I ended up stumbling onto that one just before you
responded, and it did work great. Thanks a bunch!
Richard
--
RMC,CPA


If you use DAO, add the statement:

DBEngine.Idle dbRefreshCache

after the coe to run the 2 Append Queries to make sure
Records are actually appended into the Table(s) rather
than still pending in cache.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top