Locked/unlocked

aldeb

Registered User.
Local time
Today, 06:52
Joined
Dec 23, 2004
Messages
318
I have 4 yes/no check boxes on a form. There are 4 other text fields with each one of these main yes/no check boxes. One of these yes/no checkboxes will be checked on each form created.

-------------------------------------------------------------------------------------------
StaPrimary FirstName LastName VerifyDate ReVerifyDate

StaUp FirstName LastName VerifyDate ReVerifyDate

StaBack FirstName LastName VerifyDate ReVerifyDate

StaOther FirstName LastName VerifyDate ReVerifyDate
-------------------------------------------------------------------------------------------

For each new form created I want all 4 checkboxes and its corresponding 4 fields unlocked/enabled.

When any one of the 4 main checkboxes is true, I want the other three and and the 4 text fields that go with them locked and/or disabled.

When I page back and forth between forms I want each form to have the appropriate fields locked/unlocked and or disabled/enabled depending on which main yes/no check box is checked.

I had presented this issue in the past and was never able to solve the issue.

Thanks for any help.
 
It sounds like you need to have code in the On Current event of your form which scans the fields and sets the properties as required. Have the code get the value of the field that holds the requirement (Me.FieldName.Value = True) and then set the properties of the remaining fields (me.fieldname2.locked = true; me.fieldname3.enabled = false; etc).

On current will run whenever the record is changed so you will have the correct updates for each record as you scroll through them.
 

Users who are viewing this thread

Back
Top Bottom