reset button coding

  • Thread starter Shivalee Gupta via AccessMonster.com
  • 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
 
S

Samantha Rawson via AccessMonster.com

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
 
M

Marshall Barton

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.
 
S

Shivalee Gupta via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top