Using AfterUpdate on a combo box to reset another field value

JamesWB

Registered User.
Local time
Today, 04:54
Joined
Jul 14, 2014
Messages
70
Afternoon. :)

I have a combo box, 'Type' that has two values - "Instrument" and "Equipment".

Another combo box control, 'Criticality', has an Enabled = False value set OnCurrent.

When the user selects "Equipment", Criticality goes Enabled = True and when OnUpdate to "Instrument", Criticality goes Enabled = False.

So far, so good, everything works. The Criticality field correctly displays and switches off if someone selects Instrument.

However, if someone puts a value in whilst Type is set to "Equipment" and then Type is reset to "Instrument" and in the meantime the user has selected a value for Criticality, the value stays 'stuck' in the Criticality box, despite the field being disabled. It is a bound field.

How do I purge any contents stored in Criticality when the field is disabled? I presume it's something like an SQL statement to set the value to null, but I'm not quite certain.

Many thanks for any help.
James
 
Maybe something like:
Me.Criticality = Null
In the After Update event of the combo box
 

Users who are viewing this thread

Back
Top Bottom