Option Compare Database

Sub OpenAnotherDatabase()
'Opens another database from this one
Dim app As Access.Application
Dim wks As Workspace
Dim db As Database
Dim rst As DAO.Recordset
    Set app = New Access.Application
    Set wks = app.DBEngine(0)
    Set db = wks.OpenDatabase("C:\Dev\MORE_CANDY.accdb")
    Set rst = db.OpenRecordset("MORE_CANDY", dbOpenSnapshot)
    Do Until rst.EOF
        Debug.Print rst!CandyName
        rst.MoveNext 'remember this or it goes forever!
    Loop
    rst.Close
    Set rst = Nothing
    Set db = Nothing
    Set wks = Nothing
    app.Quit
End Sub
