Only Lock some of the contorls/fields on the form

G

Guest

Hello,

I know "AllowEdits" is applied on the whole form because it is the property
of the form. And it is useful to lock all the cotrols on a form to achieve
locking the record.

What about if I want to lock some of the key contorls on the form based on
the "Status=LockYes"? (I guess may be I should use "Locked" property for the
controls I want to lock).

Could some one who has experience give me more details or advice how to only
lock some of the controls on the form?
 
R

Rick B

Do a search, as this is asked and answered all the time. in short, place a
statement in the form's OnCurrent event that sets the controls' Locked
property based on the Status.

something like...



If Status = true then
SomeFieldName.Locked = True
SomeFieldName2.Locked = True

Else
SomeFieldName.Locked = False
SomeFieldName2.Locked = False

End If




Hope that helps.

Rick B
 
G

Guest

Thanks for your reply and patience!

Rick B said:
Do a search, as this is asked and answered all the time. in short, place a
statement in the form's OnCurrent event that sets the controls' Locked
property based on the Status.

something like...



If Status = true then
SomeFieldName.Locked = True
SomeFieldName2.Locked = True

Else
SomeFieldName.Locked = False
SomeFieldName2.Locked = False

End If




Hope that helps.

Rick B
 

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