Access generated error - Error message

R

Raj

Dear All,

I just faced a problem this morning, and i have kind of fixed temporarily. I
have an access database where i used the module for disabling/enabling the
shift key, just to secure my stuff. This morning one of the users had
problem. Looks like if i disable the shift key module, the database works
fine else it throws an error - Access generated error and woould close now.
Please restart your application.

What does this mean, am i missing something to know.
I appreciate your help folks.

Thanks.
-Raj.
 
R

Ron Weiner

Without seeing your code I can't even imagine what the problem might be.
But If you are interested in downloading a utility that can set or unset the
AllowShiftByPass property you might consider downloading the sample Access
2000 database at http://www.worksrite.com/AllowBypassKey.htm

Good luck with your project
 
R

Raj

Ok, here is the code I used for enabling/disabling the shift key function.

Private Sub DisableShiftKey_Click()

Dim db As DAO.Database
Dim prp As DAO.Property

Set db = CurrentDb
db.Properties.Delete "AllowBypassKey"

Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False, True)
db.Properties.Append prp

db.Properties.Refresh

Set prp = Nothing
Set db = Nothing

End Sub

Am i doing wrong somewhere to cause that error. This error is not all the
time, it sometimes dosent even come, and somwtimes it throws. I would
appreciate if you can clear the problem I have.

Thanks.
-Raj
 
R

Ron Weiner

Yes most definitely you are doing something wrong.

First you do not have an error handler in this routine, and second you can
expect an error if the "AllowBypassKey" property already exists. You might
want to download my sample database at
http://www.worksrite.com/AllowBypassKey.htm and study the code there that
sets and unsets this property.
 

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