Permission Denied

J

jsamdirect

I am having an issue with a Microsoft Access 2003 database that has
forms designed to import data. When trying to do the import I get a
message microsoft office access permission denied. This is being done
on a Windows 2003 Server R2 SP1 Terminal Server. The interesting thing
is if I add the user to the domain admins group it work fine. I believe
their is a permission issue (duh), maybe on a file or folder, but
cannot pin point it.

I have verified that the user has access to the database and folder
that the database is in and SQL permissions are correct. Also, the same
user can do the import fine on another terminal server that is Windows
2003 Server SP1 (not R2).
 
J

Joseph Meehan

jsamdirect said:
I am having an issue with a Microsoft Access 2003 database that has
forms designed to import data. When trying to do the import I get a
message microsoft office access permission denied. This is being done
on a Windows 2003 Server R2 SP1 Terminal Server. The interesting thing
is if I add the user to the domain admins group it work fine. I
believe their is a permission issue (duh), maybe on a file or folder,
but cannot pin point it.

I have verified that the user has access to the database and folder
that the database is in and SQL permissions are correct. Also, the
same user can do the import fine on another terminal server that is
Windows 2003 Server SP1 (not R2).

Read write create modify and delete? Both the location of the Access
database and workgroup files?
 
J

John Nurick

The user needs RWXD permissions on the folder(s) containing the .mdb
file(s): Jet wants to create and delete its .ldb locking-information
files.
 
J

jsamdirect

John said:
The user needs RWXD permissions on the folder(s) containing the .mdb
file(s): Jet wants to create and delete its .ldb locking-information
files.

I gave the user full access to the folder where the .mdb is and the
..ldb is created when the user opens the database. Still no luck. Any
thoughts on where the workgroup files are located?
 
J

jsamdirect

Joseph said:
Read write create modify and delete? Both the location of the Access
database and workgroup files?

I gave the user full access to the folder where the .mdb is and the
..ldb is created when the user opens the database. Still no luck. Any
thoughts on where the workgroup files are located?
 
J

John Nurick

I gave the user full access to the folder where the .mdb is and the
.ldb is created when the user opens the database. Still no luck. Any
thoughts on where the workgroup files are located?

Application.SysCmd(acSysCmdGetWorkgroupFile)
 
J

jsamdirect

Application.SysCmd(acSysCmdGetWorkgroupFile)

I found it in the \\path to user profile\Application
Data\Microsoft\Access directory. The user has full access to this file.
I tried creating a new security workgroup but still no luv. I have to
assume the issue is permissions on the server (Windows 2003 R2 SP1)
since it works fine on another server (Windows 2003 SP1).

It has been suggested that a workaround is to give a security group
access to the system32 directory and then add the user to that group.
The issue with this is I would have to change permissions on the system
directory (skerrrrry).
 
J

John Nurick

On looking back to the beginning of this thread I find it's not clear
what error you are getting and whether it relates to permissions on
Access objects in the database or to file system permissions.

What if anything is the error number? What are the exact words of the
error message?
 
J

jsamdirect

John said:
On looking back to the beginning of this thread I find it's not clear
what error you are getting and whether it relates to permissions on
Access objects in the database or to file system permissions.

What if anything is the error number? What are the exact words of the
error message?

The error title is "microsoft office access" and the message is
"permission denied". There are no error numbers, which is one of the
reasons it is hard to determine the issue.
 
J

John Nurick

You've mentioned "forms designed to import data". So presumably the data
is being imported by VBA code behind the form(s) that calls one of the
standard TransferXXX methods or maybe assembles and executes SQL
statements.

Have you set a breakpoint at the beginning of this procedure and stepped
through the code? What line is producing the error?
 
J

jsamdirect

John said:
You've mentioned "forms designed to import data". So presumably the data
is being imported by VBA code behind the form(s) that calls one of the
standard TransferXXX methods or maybe assembles and executes SQL
statements.

Well, I did not create the database / form. However here is the code. I
can enter the month, year, and source ok. When I click on the create
import button I get the error. When it works the import id is created,
when it fails it is not.

Private Sub CreateImport_Click()
On Error GoTo err_h

If Not IsNull(Me!ImportID) Then
MsgBox "You have already created an import. You can proceed with
importing the entities"
Exit Sub
End If
If IsNull(Me!Month) Or IsNull(Me!Year) Then
MsgBox "Please enter a month and year"
Exit Sub
End If
If IsNull(Me!Source) Then
MsgBox "Please select a source"
Exit Sub
End If

DoCmd.Hourglass True

Dim db As Database
Set db = CurrentDb()

Dim rs As Recordset
Set rs = db.OpenRecordset("Imports", dbOpenDynaset, dbAppendOnly +
dbSeeChanges)
rs.AddNew
rs!MonthID = Me!Month
rs!Year = Me!Year
rs!SourceID = CInt(Me!Source)
rs.Update
rs.Bookmark = rs.LastModified
Me!ImportID = rs!ImportID
rs.Close

DoCmd.Hourglass False
Exit Sub

err_h:
Beep
MsgBox Err.Description
DoCmd.Hourglass False
Exit Sub
End Sub

Private Sub Form_Open(Cancel As Integer)
On Error GoTo err_h

DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE T_FieldMappings SET SourceField = NULL"
DoCmd.SetWarnings True

Me.Import_subform.Form!SourceField.Requery
Exit Sub

err_h:
Beep
MsgBox Err.Description
DoCmd.SetWarnings True
Exit Sub
End Sub
 
J

John Nurick

Since you didn't answer my question about which line line of code is
raising the error, I presume you don't know, and don't know how to find
out.

For a start, go to the Options dialog in the VB Editor and set it to
"Break on Unhandled Errors". Then comment out the statement
On Error GoTo err_h
in CreateImport_Click()

Then when the error occurs the debugger should start and you'll see (a)
a full error message with error number and (b) the line of code that
caused it.

Has user-level security been set up on this database? Do different users
have different degrees of access to objects or functionality in the
database?

What is the table or query called "Imports"? Is it a table in the same
mdb file as the form, or is it a linked table connected to another mdb
file (the common "split" setup), or a table in some other database
engine?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top