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
DoCmd.OpenQuery "QmakDOuts" 'makes the table
StrTable = ap_GetUserName2 'gets the user's name from OS
DoCmd.Rename StrTable, acTable, "TblDOuts" 'renames