Visual Basic Question: Login/Password Authentication
Hello again! Im sure alot of you noticed my VB questions... you all have been AWSOME help.
Goal: Be able to have a user enter a log in name, and a password in a form, have the form search for the credintials on a database (access) (to see if they are correct) and then allow the user to go on to the next form.
Question: I have no idea how to do this, I dont know how or what syntax to use when the user presses "enter". Basically i got 2 text boxes Name/Password. I have a database using access. how do i link the 2 together? How do i even tell the form "if this matches what the database then go to next form, else msgbox blab bhab blahb" i hope thats enough info... Im still a new comer at this, this project due in less then 48 hours. a team mate dropped this on me so its urgent! thnx again.
Re: Visual Basic Question: Login/Password Authentication
Quote:
Originally posted here by TSeNg
Question: I have no idea how to do this, I dont know how or what syntax to use when the user presses "enter".
In VB, when one double clicks on an object, the code widow cmes up, and for text boxes, it has the handling for the changing of text method open.
Select the KeyPressed() event and use that to say something along the lines of:
If (KeyAscii = 13) then '13 is the ascii code for carriage return
do database compare
end if
I'll look into the database later today, but I beleive you need to add a data object or 2, and then there is a property of which data source (your database) to link that to. From there, I'd check something more VB specific online.