Hi all
Access 97
This sounds like a fairly standard sort of thing to do, but I am stuck.
I want a text box in a form (to update a field in a table) to be enabled or
disabled for editing depending on the value of another field within the same
record.
Eg: if ClientType field is "Company" then I want a yes/no box tied to field
"PLC" to be enabled to tick, but if the ClientType field is anything else I
want the PLC checkbox to be disabled and greyed out.
There are two problems. I expect that should be fairly easy (albeit
currently beyond my capabilities) to have the enabling/disabling updated
when amendments to the record are saved, so that when next opening the
record the field will be enabled or not. However, ideally (and I suspect
more difficult to achieve) I would like the field to be enabled or disabled
instantanously when the ClientType field is amended. I can live without
this ideal if I have to.
Thanks for any help.
John Spencer - 18 Nov 2005 20:00 GMT
You don't enable/disable fields. You enable/disable controls.
I would put code in two places. The form's current event and the ClientType
control's afterupdate event.
If Me.ClientType & vbNullstring = "Company" Then
Me.PLC.Enabled = True
Else
Me.PLC.Enabled = False
End If
> Hi all
> Access 97
[quoted text clipped - 18 lines]
>
> Thanks for any help.
Jack Sheet - 19 Nov 2005 00:00 GMT
Thanks John

Signature
Return email address is not as DEEP as it appears
> You don't enable/disable fields. You enable/disable controls.
>
[quoted text clipped - 29 lines]
>>
>> Thanks for any help.