Hi. I have a database with a table called Agents. In this table are the agents Username, Password, Name, Address etc
I want a form so they can login using this data. So for example in my table i would have:
Adamsmith, Pass, Adam Smith, 22 Street.
On my form i would have
Username: (text box called username.text)
Password: (text box called password.text)
And a submit button.
I know i would have to use SQL to retrieve the info from the tables, and then VB to compare it to the text boxs.
Iv tried haveing the button preform a VB script of this:
"SELECT Password FROM Agent
WHERE Username=username.text
if password.text=password then openform.mainmenu; closeform.login
msgbox"Wrong password"
but it doesnt work.. I have no idea where to go from here to any input would be appreciated
I want a form so they can login using this data. So for example in my table i would have:
Adamsmith, Pass, Adam Smith, 22 Street.
On my form i would have
Username: (text box called username.text)
Password: (text box called password.text)
And a submit button.
I know i would have to use SQL to retrieve the info from the tables, and then VB to compare it to the text boxs.
Iv tried haveing the button preform a VB script of this:
"SELECT Password FROM Agent
WHERE Username=username.text
if password.text=password then openform.mainmenu; closeform.login
msgbox"Wrong password"
but it doesnt work.. I have no idea where to go from here to any input would be appreciated
