I'm a begining programmer and I am having some trouble with arrays.
I have a program that uses a form_load to populate an array with some
checking accounts and then I need to search the array for a given
account number and return the account balance.
If the account number isn't found, a message box appears with an
error message.

I have successfully written the loop to search the array and return
the balance, but it keeps testing the other instances in the array.
For example, if

accounts(4) = (acctNo as Double, balance as Double,
overdraftProtection as Boolean)

accounts(0) = (101,100,false)
accounts(1) = (102,150,true)
accounts(2) = (103,180,false)
accounts(3) = (106,100,true)
accounts(4) = (107,130,false)


If I search the array for account 101 it displays the balance and
then gives me 4 error messages. I want it to stop searching when it
finds the account, and not display the error if it finds the account
number.

Thanks

Randy