Actually, you hasve to put code in two places ---
1. Put the following code in FieldA AfterUpdate event:
If Me!FieldA = True Then
Me!FieldB.Enabled = True
Else
Me!FieldB.Enabled = False
End If
2. Put the same code in the form's On Current event.
You need to do 2 so correctly enable FieldB when the form opens and when you
navigate through records.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com
>I have a combobox valuelist field that is needs to be enabled in my subform
> when another field is selected (Yes/No)
[quoted text clipped - 13 lines]
>
> T
T.Kay - 01 Jun 2007 20:03 GMT
There is still an issue with the latter half of the code
Me!FieldB.Enabled=False is coming up as an error in the (On Current)
1. Does it matter that this is a subform of a main form?
2. Does it matter whether the Enabled Property for FieldB is already set at
yes or no?
> Actually, you hasve to put code in two places ---
> 1. Put the following code in FieldA AfterUpdate event:
[quoted text clipped - 31 lines]
> >
> > T
Steve - 02 Jun 2007 00:48 GMT
It sounds like you put the code in the main form's On Current when you
really need to put it in the subform's On Current event. If that does not
work, are FieldA and FieldB on the main form or subform?
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com
> There is still an issue with the latter half of the code
> Me!FieldB.Enabled=False is coming up as an error in the (On Current)
[quoted text clipped - 42 lines]
>> >
>> > T
In addition to steve's reply you can also put it in one line:
me![fieldB].enabled= not me![fieldA]
but indeed place it in the two sections steve mentioned
hth

Signature
Maurice Ausum
> I have a combobox valuelist field that is needs to be enabled in my subform
> when another field is selected (Yes/No)
[quoted text clipped - 11 lines]
>
> T