reset button coding

  • Thread starter Thread starter Shivalee Gupta via AccessMonster.com
  • Start date Start date
S

Shivalee Gupta via AccessMonster.com

i am working on access 2000. i have a form on which i have 7 combo-boxes getting values from 7 different queries. i want to know that after i have seen the value of a combo-box, i would like to have a reset button which will empty the combo-box's value to nothing-empty. what is the coding for that?

please help.
thanks
 
You need to have some sort of event trigger or a button. Create a button that sets the value to 0. Create a button in the design view of the form, then when stuff comes up just press cancel. Going into VBA and type this, replacing the names. I'm a total beginner at VBA but this might work:

Private Sub ButtonName_Click()
ComboBoxName.Value=0

End Sub

I don't know. Sorry if this has been no help.

Samantha Rawson
 
Samantha said:
You need to have some sort of event trigger or a button. Create a button that sets the value to 0. Create a button in the design view of the form, then when stuff comes up just press cancel. Going into VBA and type this, replacing the names. I'm a total beginner at VBA but this might work:

Private Sub ButtonName_Click()
ComboBoxName.Value=0

End Sub


That's good Samantha, except that it's far more common to
use Null rather than 0 to indicate no value.
 
dear Samantha Rawson,
thank you very very much for the answer. it worked the way you said it and the way i wanted it.
thank you very much.
shivalee
 
Back
Top