I'm trying to open an Access table from Excel and being told
Run-time error '3051':
The Microsoft Jet database engine cannot open the file
'Q:\CDList98K_BE - Copy.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.
Q: is a mapped drive which I can open/see in Explorer okay.
It is not already opened so it must be a permission problem?
How might I resolve this please ?
Run-time error '3051':
The Microsoft Jet database engine cannot open the file
'Q:\CDList98K_BE - Copy.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.
Q: is a mapped drive which I can open/see in Explorer okay.
It is not already opened so it must be a permission problem?
How might I resolve this please ?
Code:
Function MyCDList() As DAO.Database
Set MyCDList = DAO.OpenDatabase("Q:\CDList98K_BE - Copy.mdb")
End Function
Function GetCDListData(Cat) As DAO.Recordset
Dim sql As String
sql = "Select * From CDTracks Where TCat = " & Cat & ";"
With MyCDList.CreateQueryDef("", sql)
Set GetCDListData = .OpenRecordset
.Close
End With
End Function