clear a Form

S

sdg8481

Hi, i know there must be a really simple anwser to this but i just can't
figure it out.

Basically i just need to know the VB code that i can use on the OnClick
event of a command button that will empty (clear) multiple Combo and text
boxes within a single form, that i have used a criteria for a query.

Thanks in advance.
 
W

Wayne Morgan

Set each control to Null if these are unbound controls.

Example:
cboCombo1 = Null
cboCombo2 = Null
txtTextbox1 = Null

There are some tricks you can use in naming these controls if there are a
lot of them that will let you do this in a loop. If there are only three or
four controls though, it would be about as much typing either way.
 
Top