VBA code on forms

J

John Bruen

I have internal security built in a database. Depending on
the access rights, I set enable to true and unlock certain
fields where only admin can change them. I originally have
the fields locked and disable on the form. If an admin
does use the database, I enable all the fields and unlock
them in the VBA code. On one field if it is changed from
0, I set another field in the code. For some reason it
acts like the field is locked and cannot be changed. If I
comment out the code for changing the other field
everything works fine. I ran thru the debug and the field
is unlocked. Does anybody have any suggestions?
 
J

John Bruen

If I change the code from on_change to lost_focus, I can
update the field then.
 
L

Larry Linson

Check Help and Documentation on when the Change event fires; IIRC, it fires
with every keystroke you make in the Control, and that is probably not what
you want.

Larry Linson
Microsoft Access MVP
 

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