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

reset the form

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is there a simple method for reseting the form ?
 
How do you mean? Do you mean refresh the data to show updates? If so, try Me.Requery.

If something else, let us know. Have fun! :eek:)

Alex Middleton
 
i mean that:

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=""

but i need another method (more simple)
 
add this to the command button code:

me.dataentry=true

i hope this is usefull!!!
 
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),
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top