Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a program I am working on. The program has a text box that accepts account numbers when a card is swiped. What I want to do is when a person swipes the card it searches a database for that account. The acoount is a 10 digit number. I tried to set up a event when the text is changed, but what happens is as soon as the card is swiped it recogonizes the first number then searches the database for the first number. Is there a way that I can have the text box want until the whole account number is entered.

You could do it a couple of ways. You could wait until the textbox loses focus (probably not that great of an idea), or you could just slightly modify the routine you've already written to first check the length of the textbox, and if it's equal to 10, look up the record in the db.
if len(txtAccountNumber.text) = 10 then
'look up data in a database
end ifI've only been doing VB for about a week (I got a new job and they exclusively use VB and ASP.) so I'm a little shaky on the syntax but you get the general idea.
-SN

SN's approach to your problem is probably your best bet. Wait until the text reaches full length then process the DB search routine.
"I got a new job and they exclusively use VB and ASP."Ahhhhhhhhhhhhhh! You can always throw system calls to your Perl scripts :)
I did that from PL/SQL via Java to my C++ programs when I first started working for my current employer... (there were really no standards in place though). They were primarily developing in PL/SQL, Javascript, and C.
I introduced PHP, C++, Perl, and Java into the applications that we were writing... so
now they don't have a choice but to support it until the end of the application's life cycle at least. :)I have a library that I wrote with useful C++ functions, if I can't rewrite it in the language being used, then I drop to a system call and use the C++ functions. lol
IR

Yeah I'm sure they would love that...I'll sneak into the server room at night and install activeperl and php :-)
I can already feel the bad coding habits seeping into my bones...Microsoft technology is coder cancer!!! :-)
-SN

![]() |
C++..HELP me with charact...
|
mysql and PHP problem
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |