You need to do it in code in two places; firstly in the form's Current event
procedure to handle when the user navigates to an existing or new record;
secondly in the AfterUpdate event procedure of the Grinding control for when
a user updates that control. In the latter you will also need to remove any
existing value from the TSL M control as otherwise a perverse user could
uncheck Grinding then enter a value in TSL M, and then go back and check
grinding, resulting in inconsistent data. This may sound an unlikely
scenario but Murphy's Law dictates otherwise!
So, the code for the form's Current event procedure will be:
Me.[TSL M].Enabled = Not Nz(Me.Grinding,False)
The Nz function is used here to return a False value if Grinding is Null.
Although a Boolean (Yes/No) column can only have values of True or False,
when you first navigate to a new record in a form the check box control bound
to it will be Null until you begin to enter data in the form.
The code for the Grinding check box control's AfterUpdate event procedure
will be:
If Me.Grinding Then
Me.[TSL M] = Null
Me.[TSL M].Enabled = False
Else
Me.[TSL M].Enabled = True
End If
Ken Sheridan
Stafford, England
Hi Alex how would i go about locking/disabling the text box, in the
properties dialog its either Yes/No answer for Enable/Locking and does not
give the option to do any else?
Hi is it possible for a warning message to appear if a user tries entering
data in a field?
[quoted text clipped - 16 lines]