Forum Discussion

Maxine14062's avatar
Maxine14062
Brass Contributor
Jan 11, 2024
Solved

Pause code

I am running quite a few queries in VBA to create a master query that is the recordsource for a report before opening the report in preview mode. Is there a command that would create a short pause to allow all the queries to run completely before previewing the report? I am getting an error 7874 intermittently.

 

Thank you in advance,

Max

2 Replies

  • Do you mean to say you are Creating or Updating queries before running the report?
    In that case you need to refresh the QueryDefs collection:
    currentdb.QueryDefs.Refresh

Resources