2. 3. 'The name of the database 4. Const STR_DB_NAME As String = "C:\Path\MWCSDB.mdb" 5. 6. 'The MS Access Object Library is needed for this object 7. Dim objAccessApp As Access.Application 8. Dim lngMemNum As Long 9. 10. 'The member number to look for in the database 11. lngMemNum = CLng(ActiveCell.Value) 12. 13. 'Create a new MS Access Session 14. Set objAccessApp = New Access.Application 15. 16. With objAccessApp 17. 'Opens the database as above 18. .OpenCurrentDatabase STR_DB_NAME 19. 'Opens the required form but with a WHERE statement so only the record 20. 'requested is displayed 21. .DoCmd.OpenForm "frmMembership", acNormal, , "[lngMemID] = " & lngMemNum 22. End With 23. 24. 'Destroys the MS Access object (closing MS Access with it) 25. Set objAccessApp = Nothing 26. 27. End Sub