Syntax

expression.Recordset

expression A variable that represents a QueryTable object.

Remarks

If this property is used to overwrite an existing recordset, the change takes effect when the method is run.

Example

This example changes the Recordset object used with the first query table on the first worksheet and then refreshes the query table.

Visual Basic for Applications
With Worksheets(1).QueryTables(1) .Recordset = _ OpenDatabase("c:\Nwind.mdb") _ .OpenRecordset("employees") .Refresh End With

See also: