Lock forms?

J

James

Can you tell me if it is possible to lock records of a
form after it has been filled out? I do however want
someone with say admins permissons to be able to unlock it
again if it needs alterations applied.

Thanks James
 
C

Constantinos

Hi James,

What I do in my application is the following.
create a function, say called "disable_controls"
on the on_open event of the form you call this function by
"call disable_controls"

in the function you would locked the fields and change
their color.

firstname.locked = true
firstname.backcolor = ???

I would have a button on the form called edit.
another function called enable_controls
which would be something like
firstname.locked = false
firstname.backcolor = ???

on the click event of the button I would do
call enable_controls

then, a save button which would save the record and lock
the fields again.
docmd.runcommand save ????
call disable_contrls


when certain people log in to the database you can hide
the edit button so they can't make any changes.
editbutton.visible = false in the on_open event.
Hope this helps & good luck
 
J

James

Thanks for your help but what i really want to do is to be
able to lock specific records not specific controls. So
they are locked all the time.

James
 

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