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

Please define "control array" 2

Status
Not open for further replies.

ImJay

Technical User
Apr 12, 2005
12
US
This was one one the responses to a question that I also need answered.

I would make a control array and then check to see if any of the required fields are blank and if one is prompt the user with a message box saying that it is a required field and then set focus to the textbox.

How do I create a control array?

Thanks,
Imjay
 
Put the same names: eg txtF, to all textboxes. The index to the first should be 0, the second's 1 etc....

To check:

for i=0 to txtF.Ubound
if txtF(i).Text = "" then
msgbox "something is missing!!"
txtF(i).SetFoucus
exit for
end if
next
 
If you haven't created them in the order you want to access them in, you can go to the properties page for each and change the index value too.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top