S
StuJol
I have an Access2003 database split into a FE & BE. depending on the frontend
version, it updates / creates new tables in the backend using DAO. All has
worked fine in the past until just recent where i started to get error 3111.
sometimes the DAO code would run without this error and some times i got this
error. now this error appears all the time when trying to create / modify BE
tables. The exact error is Error 3111, could not create, no modify design
permission for table or quey "tblTable"
i have approx 15 different functions that run DAO and none of them will
work, even thou they once did so i dont think its a code issue.
i have uninstalled Access2003 and re-installed and that made no difference.
i have ran virus scans and found nothing. i have bought registry mechanic and
also RegCur but even thou they have fixed 100's of issues, i still continue
to get this 3111 Error.
below is an example of one of my function. if anyone has any ideas please
please let me know.
Function Step0() As Boolean
On Error GoTo Err_Step0
'Action: Creating tblUpgradeEventLog
'If table already exists, cancel operation and move to next step.
If fExistTable2("tblUpgradeEventLog") = True Then
Step1a 'Run Function
Exit Function
End If
'Create table tblHMRCIncomeCategorys using DAO.
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set db = OpenDatabase("C:\Program Files\Easara\Easara Home Office
Suite\Database\Home Office Suite Database.mdb")
Set tdf = db.CreateTableDef("tblUpgradeEventLog")
'Specify the fields.
With tdf
'AutoNumber: Long with the attribute set.
Set fld = .CreateField("IDnumber", dbLong)
fld.Attributes = dbAutoIncrField + dbFixedField
.Fields.Append fld
.Fields.Append .CreateField("EventDate", dbDate)
.Fields.Append .CreateField("EventNumber", dbText)
.Fields.Append .CreateField("EventDescription", dbText, 255)
.Fields.Append .CreateField("CallingProc", dbText)
.Fields.Append .CreateField("UserName", dbText)
.Fields.Append .CreateField("ShowUser", dbBoolean)
End With
'Save table.
db.TableDefs.Append tdf
Set fld = Nothing
Set tdf = Nothing
'Clean up
Application.RefreshDatabaseWindow 'Show the changes
Set fld = Nothing
Set tdf = Nothing
Set db = Nothing
'Proceed with upgrade
Step1a ' Run Function
Exit_Step0:
Exit Function
Err_Step0:
Select Case Err.Number
Case Else
Call LogError(Err.Number, Err.Description, "713-002", True)
Resume Exit_Step0
End Select
End Function
version, it updates / creates new tables in the backend using DAO. All has
worked fine in the past until just recent where i started to get error 3111.
sometimes the DAO code would run without this error and some times i got this
error. now this error appears all the time when trying to create / modify BE
tables. The exact error is Error 3111, could not create, no modify design
permission for table or quey "tblTable"
i have approx 15 different functions that run DAO and none of them will
work, even thou they once did so i dont think its a code issue.
i have uninstalled Access2003 and re-installed and that made no difference.
i have ran virus scans and found nothing. i have bought registry mechanic and
also RegCur but even thou they have fixed 100's of issues, i still continue
to get this 3111 Error.
below is an example of one of my function. if anyone has any ideas please
please let me know.
Function Step0() As Boolean
On Error GoTo Err_Step0
'Action: Creating tblUpgradeEventLog
'If table already exists, cancel operation and move to next step.
If fExistTable2("tblUpgradeEventLog") = True Then
Step1a 'Run Function
Exit Function
End If
'Create table tblHMRCIncomeCategorys using DAO.
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set db = OpenDatabase("C:\Program Files\Easara\Easara Home Office
Suite\Database\Home Office Suite Database.mdb")
Set tdf = db.CreateTableDef("tblUpgradeEventLog")
'Specify the fields.
With tdf
'AutoNumber: Long with the attribute set.
Set fld = .CreateField("IDnumber", dbLong)
fld.Attributes = dbAutoIncrField + dbFixedField
.Fields.Append fld
.Fields.Append .CreateField("EventDate", dbDate)
.Fields.Append .CreateField("EventNumber", dbText)
.Fields.Append .CreateField("EventDescription", dbText, 255)
.Fields.Append .CreateField("CallingProc", dbText)
.Fields.Append .CreateField("UserName", dbText)
.Fields.Append .CreateField("ShowUser", dbBoolean)
End With
'Save table.
db.TableDefs.Append tdf
Set fld = Nothing
Set tdf = Nothing
'Clean up
Application.RefreshDatabaseWindow 'Show the changes
Set fld = Nothing
Set tdf = Nothing
Set db = Nothing
'Proceed with upgrade
Step1a ' Run Function
Exit_Step0:
Exit Function
Err_Step0:
Select Case Err.Number
Case Else
Call LogError(Err.Number, Err.Description, "713-002", True)
Resume Exit_Step0
End Select
End Function