I am trying to open a specific access database from within vb which runs when i click a button, below is the code i have so far but when it runs it opens access and then shuts it down straight away - any ideas?
Dim appAccess As Object
'Open excel and make visible
Set appAccess = CreateObject("Access.Application"
appAccess.Visible = True
Dim wrkStud As Object
Set wrkStud = appAccess.Application.DBEngine.Workspaces(0).OpenDatabase("C:\Documents and Settings\Administrator\Desktop\UMS\ADReal.mdb"
Dim appAccess As Object
'Open excel and make visible
Set appAccess = CreateObject("Access.Application"
appAccess.Visible = True
Dim wrkStud As Object
Set wrkStud = appAccess.Application.DBEngine.Workspaces(0).OpenDatabase("C:\Documents and Settings\Administrator\Desktop\UMS\ADReal.mdb"