M
Mari
I need to lock and unlock all the fields on a form and several subforms on
the fly. Any suggestions?
Thanks!
the fly. Any suggestions?
Thanks!
Matt Weyland said:Create a sub
private sub LockFields()
with me
.field.locked = true
.field2.locked = true
.field3.locked= true
end with
end sub
privat sub unLockFields()
with me
.field.locked = false
.field1.locked = false
.fields3.locked = false
end with
ens sub
Associate these subs with the respective events.
form suborms the syntax is
[form].[subform]!fields.control
The ! is critical.
HTH
MW
-----Original Message-----
I need to lock and unlock all the fields on a form and several subforms on
the fly. Any suggestions?
Thanks!
.
Mari said:Thanks for the response. That's pretty much the code I'm using now ... I
guess I should have been more specific. There are so many fields in this
database that I was hoping there was a sort of "universal" lock that would
take care of all the fields at once, sort of like form.locked = true.
Matt Weyland said:Create a sub
private sub LockFields()
with me
.field.locked = true
.field2.locked = true
.field3.locked= true
end with
end sub
privat sub unLockFields()
with me
.field.locked = false
.field1.locked = false
.fields3.locked = false
end with
ens sub
Associate these subs with the respective events.
form suborms the syntax is
[form].[subform]!fields.control
The ! is critical.
HTH
MW
-----Original Message-----
I need to lock and unlock all the fields on a form and several subforms on
the fly. Any suggestions?
Thanks!
.