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

Code To Make All Textboxes Null 1

Status
Not open for further replies.

Survane

MIS
Jul 3, 2002
74
US
Is the code that will look at every txtbox on an open form and make the values null when a cmdbtn is pressed?

Thanks.
 
Yeah, loop through the Controls collection of the form. Something like...

For each ctl in Me.Controls
If ctl.Type = <textbox> then
ctl = null
end if
next ctl

You will need to debug it, because it won't work as-is.

Gary
gwinn7
A+, Network+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top