P
PC Datasheet
In a form/subform I have an unbound combobox in the form header that sets
the value of a field in the subform so that it does not have to be entered
for each record. In the BeforeUpdate event of the combobox I have some code
to check the value against some criteria and if the new selected value fails
the criteria, I cancel the BeforeUpdate event. I need the combobox to return
to its previous value. For example, the current value is MyValue and the new
selected value is NewValue. When the BeforeUpdate event is cancelled, I want
the combobox to return to MyValue. I have tried undoing the combobox and
undoing the form but the combobox continues to display NewValue. If I go to
another record and return back, MyValue is correctly displayed. So how do I
get the combobox to return to MyValue as soon as the BeforeUpdate event is
cancelled?
Thanks for all help!
Steve
the value of a field in the subform so that it does not have to be entered
for each record. In the BeforeUpdate event of the combobox I have some code
to check the value against some criteria and if the new selected value fails
the criteria, I cancel the BeforeUpdate event. I need the combobox to return
to its previous value. For example, the current value is MyValue and the new
selected value is NewValue. When the BeforeUpdate event is cancelled, I want
the combobox to return to MyValue. I have tried undoing the combobox and
undoing the form but the combobox continues to display NewValue. If I go to
another record and return back, MyValue is correctly displayed. So how do I
get the combobox to return to MyValue as soon as the BeforeUpdate event is
cancelled?
Thanks for all help!
Steve