delete values from combobox

Mr.K

Registered User.
Local time
Today, 09:37
Joined
Jan 18, 2006
Messages
104
My combobox looks up values from a table. If the user types in a value which is not in a table a msgbox comes up asking if he wishes to add it. If he accepts the value gets added. However, how should I handle an instance when the user adds a misspelled value and then wishes to delete it? How can I design something that would allow the user to scroll to a particular value in the combo and upon clicking Delete button remove that value from the list-table? (Then of course there is also a question of fixing the records with the misspelled value chosen:eek: )
 
I would use a second combo box with the same rowsource as the subject cbo and on the after update event of the 2nd cbo, delete the selected row in the row source, applicable to both - of course caution the user prior to the delete.

Don't use the AfterUpdate event of the first cbo, because it probably cause some kind of action.
 
the problem is that my form then would have to have 2 comboboxes but the delete request would be a very seldom accurance, so I'd rather use some other solution to keep my main form clean. Is there no way to initiate some sort of behavior after the user picks a value from the combo and then presses DELETE key? (So I guess when control has focus and user keypresses DELETE.)
 
On a "Delete" button click delete the selected record from the combo box rowsource with a query; then requery the combo box.

It's not rocket science.
 
Although, if it is just mispelled, wouldn't it be better to allow the user to edit the name? If you've assigned the value to records, it might not let you delete it without first removing that value from the records, anyway!
 

Users who are viewing this thread

Back
Top Bottom