Update a combo box using a key combination

  • Thread starter Thread starter Jen
  • Start date Start date
J

Jen

I have a form that contains several drop-down lists. I'd
like to assign one key combination (e.g., F12) so that
whenever I'm in a combo box, I can hit F12 and be able to
add a value to that particular combo box. I can't figure
out a way to have one key combination do this for ANY
combo box.

In the past I've done this by using a command button for
each combo box, but this form is very crowded already and
I don't have room for the command buttons.

Any ideas would be appreciated!
 
Examine Screen.ActiveControl.

If its ControlType property = acComboBox, read its RowSource to figure out
what table to append to.

Be sure to Undo the combo if the user has a partial entry, so you can
Requery it to display the newly entered value.

(BTW, we use the DblClick of the combo to do this.)
 
Back
Top