Re-executes the query or stored procedure, regenerating the rowset.

Syntax

<oRef>.requery( )

<oRef>

The query or stored procedure you want to re-execute.

Property of

Query, StoredProc

Description

requery( ) re-executes a stored procedure or a query’s SQL statement, generating an up-to-date rowset. Calling requery( ) is similar to setting the object’s active property to false and back to true, except that requery( ) does not prepare the SQL statement. This includes attempting to save the current row if necessary and closing the object, firing all the events along the way. If those actions are halted by the canSave or canClose event handlers, the requery( ) attempt will stop at that point.

Use requery( ) when a parameter in the SQL statement has changed to re-execute the query with the new value.

Use refresh( ) to refresh the rowset without re-executing the query, which is faster. But refresh( ) has no effect on a rowset that is not live; use requery( ) instead.