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

for each..next ???

Status
Not open for further replies.

primerov

Technical User
Aug 16, 2002
160
BG

In one of my forms i have to set the values of all controls to 0. For example
Me![cartons].Value = 0
Me![Productid].Value = 0
etc etc
I want to make all the controls in the form equal to 0.

I know there is a way to use a command to place for each control in Form control = 0 but i do not know how to do it.
May i ask for help?
 
dim ctl as Control

for each ctl in me.controls
ctl.value=0
next ctl



HTH

Ben ----------------------------------------
Ben O'Hara
Home: bpo@SickOfSpam.RobotParade.co.uk
Work: bo104@SickOfSpam.westyorkshire.pnn.police.uk
(in case you've not worked it out get rid of Sick Of Spam to mail me!)
Web: ----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top