CreateSnapshot Method Example

The first part of the example creates a Snapshot of publishers located in California, sorted by ZIP code.  The second part of the example recreates the Snapshot with a new sort order.

Dim MyDB As Database, MySet As Snapshot, MySQL As String
Set MyDB = OpenDatabase("BIBLIO.MDB")
MySQL = "SELECT * FROM Publishers WHERE State = 'CA' ORDER BY ZIP;"
Set MySet = MyDB.CreateSnapshot(MySQL)
...
MySet.Sort = "Publisher's Name"
Set MySet = MySet.CreateSnapshot()