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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting DataCombo to blank

Status
Not open for further replies.

seema165

Programmer
Jul 11, 2005
48
GB
Hi,

I want to clear the DataCombo that I have when the clear button is pressed.

I've been using the following code:

dataCombo.BoundText = ""

However, this is bringing up errors when I press the clear button, but it does clear the DataCombo box.

Any help will be appreciated.
 
Try this
Code:
Private Sub cmdClear_Click()
    DataCombo1.Text = vbNullString
    Set DataCombo1.RowSource = Nothing
End Sub

If you choose to battle wits with the witless be prepared to lose.

[cheers]
 
fyi, vbnullstring = "", in case you didn't know. Foada's telling you to use the text property instead of the boundtext property.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top