V
VBA Coder
In Word 2000 using DAO 3.6:
I am getting the following error
"Visual Basic Runtime error '3008': The table 'Test' is already opened
exclusively by another user, or it is already open through the user
interface and cannot be manipulated programmatically"
when I try to open my recordset object against a table in an Access database
where the table is open in the Access Database (MDB) in design mode. I do
not get the error if the table is open showing all the records - only if it
is open in Design mode.
Does anyone know if it is possible to run a SQL statement to return records
against a table that is open in Design Mode?
The following code is being executed against a table in an Access database
that is open in Design mode:
It fails on the OpenRecordset line:
Dim wrkJet As DAO.Workspace
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim sSQL As String
Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)
Set db = wrkJet.OpenDatabase("C:\Test.mdb", , True)
sSQL = "SELECT * FROM test"
Set rst = db.OpenRecordset(sSQL, dbOpenDynaset, dbReadOnly)
I am getting the following error
"Visual Basic Runtime error '3008': The table 'Test' is already opened
exclusively by another user, or it is already open through the user
interface and cannot be manipulated programmatically"
when I try to open my recordset object against a table in an Access database
where the table is open in the Access Database (MDB) in design mode. I do
not get the error if the table is open showing all the records - only if it
is open in Design mode.
Does anyone know if it is possible to run a SQL statement to return records
against a table that is open in Design Mode?
The following code is being executed against a table in an Access database
that is open in Design mode:
It fails on the OpenRecordset line:
Dim wrkJet As DAO.Workspace
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim sSQL As String
Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)
Set db = wrkJet.OpenDatabase("C:\Test.mdb", , True)
sSQL = "SELECT * FROM test"
Set rst = db.OpenRecordset(sSQL, dbOpenDynaset, dbReadOnly)