ResyncCommand Property [Access 2003 VBA Language Reference]

You can use the ResyncCommand property to specify or determine the SQL statement or stored procedure that will be used in an updateable snapshot of a table. Read/write String.


expression Required. An expression that returns one of the objects in the Applies To list.


The ResyncCommand property is a string expression representing a SQL statement or stored procedure that is parameterized by the key columns from the Unique Table in the output cursor, using ? as parameter markers.

You can set this property by using the property sheet or Visual Basic .

The parameters must match in number and ordering to the set of key columns for the table identified by the UniqueTable property. The purpose of the ResyncCommand property is to pull in the "fixed up" values of a row in a recordset after an update has been made, including an update to a join column.

For data access pages and for forms based on views or non-parameterized SQL queries containing a join, if the ResyncCommand property is null, Microsoft Access determines an appropriate query to use for the resync operation. For data access pages and forms based on stored procedures or parameterized SQL statements, Access cannot determine an appropriate resync query at run time, so the user must supply the ResyncCommand string in order to get the correct row fix up behavior. If the ResyncCommand property is empty and Access cannot determine an appropriate query to use, the default ADO resync operation (to display the current values) occurs after an update or insert.

Applies to | Form Object