If you want to clear data from combo box or list box, use the following vba code:
The example below shows you how to clear data from combo box before adding the new data. When the form loads, the data in the combo box are cleared before the data are populated in to the combo box again.
Private Sub Form_Load()
Combo0.RowSource = ""
Combo0.RowSourceType = "Table/Query"
'Retrieve sex data from tblStudent into combo0
Combo0.RowSource = "Select sex from tblStudent"
Posted by: Yako | post date: 01-04-2013 | Subject: VBA for MS Access
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: