Delete value from locked field

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

I have a form with multiple fields that allow editing. I have two of
these locked for editing because the user wants a consistent tool for
creating times. I gave the user an elaborate pop up form to create the
right times for the two locked fields. They click on a button to access
this time form. Once they click on OK from the time form, it closes,
returns to the original form and updates the locked time field through
code.

Now the user is requesting the ability to delete the time value on
occasion. Instead of redesigning my special time form, which is packed
with info and quite complex, I would like the user to be able to press
Delete when the time field has focus and then I detect the key press
and use code to delete the value from the field.

Is this possible. I have looked at the Key Press and Key Down events
and by description this does not appear possible. What am I missing? Is
my only choice to redesign my pop up time form? Is there another way
that I am not considering? I would think there is a quick solution but
am not sure what that may be.

Thanks for any advice.
 
The Keypress or KeyDown events would work, except that the Delete key is not
part of the ANSI character set. You could use another key or combination,
for example <CTRL>D
Another way would be a command button to clear the contents of the control.
 
Back
Top