Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove selection from Combobox when add new data

Status
Not open for further replies.

mondoray

Technical User
Jul 28, 2003
134
AU
I hope this makes sense.

I have a form that is used as an inhouse telephone directory. The form allows a user to search for a persons name or company name via a combobox and also to enter new data.

The combox box (search function) is controlled by two toggle buttons which allow the user to search by a "persons name" or by a "company name".
The combo box display format is contolled by the toggle buttons. Once data is selected via the combobox the full details are displayed on the main body of the form below the combo box. As with any combo box, the selection populates the combo box until another selection is made.

To allow the user to enter new data, the form has a command button. A macro attached to the command button takes the form to a new entry and also places the cursor in the surname (0) tab field.

Other command buttons allow the user to delete an entry, etc.

Question:

What code or macro can I use to clear the combo box of the selected entry when the "enter new data" command button (or delete entry command button)is clicked?

Another thought, is it possible to clear the combo box selection of text once the selection is made?

Many thanks

Mondoray
 
on the new data command button add

combosearch.value = ""

Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top