J
JWS315
I have a FE/BE solution with the FE complied to an mde file. I am adding a
new table through VBA and get the following error when I try to re-link the
tables.
3033 - you do not have the necessary permissions to use the "Glossary" object.
I am using the relink code from
http://www.mvps.org/access/tables/tbl0009.htm
I only get the error on the new table, all the others prior to it relink
fine...
Set tdlocal = dblocal.TableDefs(x)
tdlocal.Connect = ";DATABASE=" & Trim(strFileName)
tdlocal.RefreshLink
The following code is what I use to build the table:
'Build backend table and fields
Set tdfGlossary = dbPrevCon.CreateTableDef("Glossary")
With tdfGlossary
.Fields.Append .CreateField("Organization", dbText, 50)
.Fields.Append .CreateField("Acyn", dbText, 8)
.Fields.Append .CreateField("AcynDesc", dbMemo)
End With
dbPrevCon.TableDefs.Append tdfGlossary
For Each Fld In tdfGlossary.Fields
If Fld.Name = "Organization" Then
Fld.Required = True
End If
If Fld.Name = "Acyn" Then
Fld.Required = True
End If
Next
'Set the permissions for the table
Set con = dbPrevCon.Containers!Tables
Set doc = con("Glossary")
doc.UserName = "Admin"
doc.Permissions = dbSecInsertData + dbSecReplaceData + dbSecRetrieveData
+ dbSecDeleteData
doc.UserName = "Admins"
doc.Permissions = dbSecInsertData + dbSecReplaceData + dbSecRetrieveData
+ dbSecDeleteData
doc.UserName = "Users"
doc.Permissions = dbSecInsertData + dbSecReplaceData + dbSecRetrieveData
+ dbSecDeleteData
'Build Index for Glossary
With tdfGlossary
Set Idx = .CreateIndex("PrimaryKey")
With Idx
.Fields.Append .CreateField("Organization")
.Fields.Append .CreateField("Acyn")
.Primary = True
End With
.Indexes.Append Idx
End With
Any help is appreciated!
Jerry
new table through VBA and get the following error when I try to re-link the
tables.
3033 - you do not have the necessary permissions to use the "Glossary" object.
I am using the relink code from
http://www.mvps.org/access/tables/tbl0009.htm
I only get the error on the new table, all the others prior to it relink
fine...
Set tdlocal = dblocal.TableDefs(x)
tdlocal.Connect = ";DATABASE=" & Trim(strFileName)
tdlocal.RefreshLink
The following code is what I use to build the table:
'Build backend table and fields
Set tdfGlossary = dbPrevCon.CreateTableDef("Glossary")
With tdfGlossary
.Fields.Append .CreateField("Organization", dbText, 50)
.Fields.Append .CreateField("Acyn", dbText, 8)
.Fields.Append .CreateField("AcynDesc", dbMemo)
End With
dbPrevCon.TableDefs.Append tdfGlossary
For Each Fld In tdfGlossary.Fields
If Fld.Name = "Organization" Then
Fld.Required = True
End If
If Fld.Name = "Acyn" Then
Fld.Required = True
End If
Next
'Set the permissions for the table
Set con = dbPrevCon.Containers!Tables
Set doc = con("Glossary")
doc.UserName = "Admin"
doc.Permissions = dbSecInsertData + dbSecReplaceData + dbSecRetrieveData
+ dbSecDeleteData
doc.UserName = "Admins"
doc.Permissions = dbSecInsertData + dbSecReplaceData + dbSecRetrieveData
+ dbSecDeleteData
doc.UserName = "Users"
doc.Permissions = dbSecInsertData + dbSecReplaceData + dbSecRetrieveData
+ dbSecDeleteData
'Build Index for Glossary
With tdfGlossary
Set Idx = .CreateIndex("PrimaryKey")
With Idx
.Fields.Append .CreateField("Organization")
.Fields.Append .CreateField("Acyn")
.Primary = True
End With
.Indexes.Append Idx
End With
Any help is appreciated!
Jerry