when i press button to add the record , i write SQL statment in VBA using RunSQL function but i want to clear the values in the text boxes to insert another record >
there is a method :
text1.value=""
text2.value=""
ahmed
The easiest way I have run across for clearing a form is to make all my text boxes part of a control array. ie. instead of text1.value, text2.value, text3.... I use text(index).value
in this fasion I make all textboxes one name and just use a loop to go through and clear them out
ie
Code:
For I = 0 to 15 'that is if I have 16 controls
MyText(I).Value = ""
Next I
HTH
Scoty : Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.