By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,223 Members | 1,608 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,223 IT Pros & Developers. It's quick & easy.

Error trying to change permissions

P: n/a
Hello,

I have some code pasted below. It works down to the line where it sets the
permissions for the document and throws an exception "Runtime error 3358;
Cannot open the microsoft jet workgroup information file". I'm not using
anything more than the system.mdw for the workgroup info file. There isn't
even a password on the database. Any ideas?

Thanks!

Function ChangePermissions()
Dim db As dao.Database, con As Container, doc As dao.Document
'Set db = CurrentDb()
Set db = OpenDatabase("C:\MyDatabase.mdb", False, False)

Set con = db.Containers!Tables
Set doc = con.Documents![MyTable]
With doc
.Permissions = dbSecFullAccess
End With
Set doc = Nothing
Set con = Nothing
Set db = Nothing

End Function
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Can anyone give me ANY idea what might be wrong with the code?

"Jozef" <me@you.com> wrote in message news:p6gaf.98130$ir4.95068@edtnps90...
Hello,

I have some code pasted below. It works down to the line where it sets
the permissions for the document and throws an exception "Runtime error
3358; Cannot open the microsoft jet workgroup information file". I'm not
using anything more than the system.mdw for the workgroup info file.
There isn't even a password on the database. Any ideas?

Thanks!

Function ChangePermissions()
Dim db As dao.Database, con As Container, doc As dao.Document
'Set db = CurrentDb()
Set db = OpenDatabase("C:\MyDatabase.mdb", False, False)

Set con = db.Containers!Tables
Set doc = con.Documents![MyTable]
With doc
.Permissions = dbSecFullAccess
End With
Set doc = Nothing
Set con = Nothing
Set db = Nothing

End Function

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.