Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Permissions

Status
Not open for further replies.

RoseV

Programmer
Mar 18, 2003
37
US
I have code behind a form that runs a maketable query and then renames the table. This has been running smoothly for a few months and now all of a sudden we get error messages that a user "does not have permission to delete" and the debugger stops on this piece of code. Why are the user's permissions revoked? I never set permissions on any table and the table in question is created anew everytime the code runs.

DoCmd.OpenQuery "QmakDOuts" 'makes the table
StrTable = ap_GetUserName2 'gets the user's name from OS
DoCmd.Rename StrTable, acTable, "TblDOuts" 'renames
 
the rename statement is where it freezes up. The error messages specifically states the StrTable variable when denying permission to delete.
 
I fixed it, so here's what I did in case it will help anyone else: I limited the name of StrTable to 6 characters. I don't know WHY this works, but it does!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top