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!

Security Permissions and Error 424

Status
Not open for further replies.

Garridon

Programmer
Mar 2, 2000
718
US
I created a suspense database with different departments on it. The goal was to not allow the Sales Department into the PR Department's stuff and so forth. After I got everything working, I set up permissions for each of the departments, restricting access only to each department's menu. I gave them access to open the database, access update the underlying tables and queries, and to the various forms. Only ... things that worked fine in development and under admin stopped working under the department.

For this Add record code from the wizard, I get a 424 Error.

Private Sub cmdAdd_Click()
On Error GoTo cmdAdd_Click_Err

DoCmd.OpenForm "frmSuspenseSales", acNormal, "", "", acAdd, acNormal


cmdAdd_Click_Exit:
Exit Sub

cmdAdd_Click_Err:
MsgBox Error.Description
Resume cmdAdd_Click_Exit

End Sub

But it still works fine under my user ID.

On a search form that you double-click to go the record, the double-click stopped working. Yet, it also still works under my user ID. Just not when I log on as a member of the Sales group. What did I miss?

Thanks!
Linda Adams (Garridon@aol.com)
"The Importance of Being Grammarian," published in The Toastmaster, March 2001
 
Ah ha! I solved the problem. I inserted the following error handling code behind the button to see what it would do:

cmdAdd_Click_Err:
' If action was cancelled by the user, don't display an error message.
Const conErrDoCmdCancelled = 424
If (Err = conErrDoCmdCancelled) Then
Resume cmdAdd_Click_Exit
Else
MsgBox Err.Description
Resume cmdAdd_Click_Exit
End If

Once I did that, it stopped the runtime error and told me that I'd missed one of the queries in the permissions. So problem fixed!

Linda Adams (Garridon@aol.com)
"The Importance of Being Grammarian," published in The Toastmaster, March 2001
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top