remove data from combo box lookup

T

ThenWhen

The combo box wizard helped me make a form where users can bring up a record
(email) based on what they type into a combo box.

What's awkward is that the name persists in the box even when the form is
closed and reopened - AND - when the form is reopened the record shown is
usually not the one still visible in the combo box. Also if the user wants
to type a new name into the combo box they need to backspace out the old name.

How can I make a button that will clear the information in the combo box -
and add this functionality when the form closes?

Um... I'm still very new - so if it involves programming please spell it out
specifically - like, where I would place the code...

Enormous thanks!!!

Diane
 
A

Allen

Just assign an empty value to the combobox. For example,

MyComboBox = ""

Place this code in the Form_Close event, or in the Form_Open event, or
any other event where you want it to happen.

For examples of assigning values to comboboxes see
http://www.aislebyaisle.com/access/tools1.htm and download the Access
Tools demo, and look at the VBA code behind some of the forms.
 
T

ThenWhen

Thank you very much! I'm really impressed by the quality and speed of help
on this board.

Diane Meriwether
ThenWhen emedia
 
Top