Name
querytable.Refresh([BackgroundQuery])
Synopsis
Refreshes a query table from its data source. Returns True if the refresh was submitted successfully, False if the user canceled the refresh.
|
Argument |
Description |
|---|---|
|
|
True refreshes the data asynchronously; False refreshes the data synchronously. Default is True. |
Most types of query table store connection and data source information that is used by Refresh. The exception is recordset queries—you must set a new recordset before calling Refresh for query tables based on recordsets. See the Recordset property in Chapter 12 for an example.
When refreshing asynchronously, check the Refreshing property before calling Refresh. Otherwise, pending refreshes will cause an error. The following code cancels any pending asynchronous refresh before refreshing a query table:
If qt.Refreshing Then qt.CancelRefresh
qt.RefreshBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access