Sub main()
Dim myDatabase As dao.Database
Set myDatabase = OpenDatabase(CurrentProject.Path & "\mydb.mdb")
Dim myRecordset As dao.Recordset
Set myRecordset = myDatabase.OpenRecordset(Name:="SELECT * FROM Customers WHERE Country='Germany'", Type:=dbOpenDynaset)
Dim myBookmark As Variant
myBookmark = myRecordset.Bookmark
End Sub
|