Ok, first off, you're telling the program to retrieve all account details from the CustomerAccounts table. This is usually a bad idea as it causes unnecessary load time. In the case of a banking application, this is a lot more bad as you're retrieving all the account details (including the unique PIN) of every customer.
I would recommend storing PIN numbers encoded as an MD5 hash, then comparing a hash of the user's input to that, so the real pin is never communicated, and doesn't physically exist anywhere in it's PIN format.
Secondly, to cut down on the traffic, use a WHERE clause in your T-SQL to get the data:
SELECT * FROM CustomerAccounts WHERE (lngAccountNumber = 03747263 AND strPIN = '<md5 hash of user's pin as entered>')
Alternately, you could use a stored procedure, as previously suggested, to further improve speed and pass the account number and pin hash to the stored procedure as parameters.
As for why your current query is not working:
"txtDisplay.Text.ToString?" (assuming txtDisplay is a TextBox) The 'Text' property will return a string containing the contents of the textbox. ToString is not needed here and only increases processing time (every little helps ;) )
Also, is txtDisplay a public member of frmATM? By default, a control is a Protected object. Perhaps accessing the form's Controls collection would be better, or creating a public property on frmATM to pass the value of the textbox to foriegn forms.
Lastly, exceptions are your friend. Put your code in a Try Catch block and analyse any errors thrown using message boxes or logging. This should give you some info on where you're going wrong.
Let me know if this is any help to you.