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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission Errors 1

Status
Not open for further replies.

lewatkin

Programmer
Mar 8, 2002
91
US
Hi gang,

Can someone PLEASE point me in the direction of trapping for the "You don't have permission to run the ......" message? Those messages, like others, are not very informative to an end-user and I would love to replace them with custom messages. Any ideas?

Thanks in advance for any assistance.

Lee
 
The error number you are referring to is Error 2601 you would trap this at the Form level. So however, you trap your form errors you would place the 2601 there.

For example I use the following on my Form Error Event
'* No Permissions
Case 2601
clsMessages.UseBeep = True
clsMessages.DispMessage (apNoPermissions)
fshowIt = False

I have custom messages in a separate table so I don't need to retype handling over and over.

As you can see I use some custom functions which I have created so you could just use the Select Case place the 2601 in your Case add your msgbox, suppress the Access Error in my case I created a flag called fshowit to suppress the Access Error message. That's it.
Life's a journey enjoy the ride...

jazzz
 
Fantastic!! - Worked like a charm!!

Thanks jazzz!!

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top