locking fields

Anauz

Registered User.
Local time
Today, 07:41
Joined
Nov 14, 2000
Messages
81
Is there a way i can group fields together and lock them via the grouping option rather that locke them individullay. I have over 60 fields and need to lock/unlock depending on the action being performed ie add/edit

I can open the form in red only mode using
code -

DoCmd.OpenForm stDocName, , , , acFormReadOnly

code -

but that locks all the fields and need some unlocked so i can choose which record to view via the drop down box

thanx in advance
 
thats the problem.......i don't want to write code to lock 60 or so different fields individully. I was wondering if there was a better way of doing it.
 
I don't know if this helps, but what about if you started with them all locked by default, then only unlocked the relevant ones?

Mike
 
tried that as well Mike

DoCmd.OpenForm stDocName, , , , acFormReadOnly
locks all the fields. Then I tried to unlock some fields using Forms!formname!fieldsname.locked = false
it seems to ignore that code and keep the al the fields locked
 
I mean locking them all by editing their properties in design view, then unlocking some of them in code as appropriate.
 

Users who are viewing this thread

Back
Top Bottom