Full Version: Sample codes for Login form
UtterAccess Forums > Microsoft® Access > Access Forms
lovin
need some help for my Login form to work coz i'm still new in using Access forms... cryhard.gif
adaytay
Hi Lovin, Welcome to UtterAccess!!
That have you got so far? What kind of login system are you using?
Cheers,
Ad
lovin
Hey! well it's just a simple login where the user have to enter both their id and password...
michaela4
Hi Cheryl,
o you keep your userid and password saved on a user table and do you want the user to have access accourding to permissions or just a basic login to let them into the application?
Welcome to UA!
Michael
danishani
Welcome to UA! frown.gif
Just explain to use whats not working, so we can help you better... thumbup.gif
Daniel
lovin
thxs guys...ok its just a basic login to let em into the application e.g. by typing in their id and password and clicking on the Enter button... i have a table in my db with two fields: id and pw...
danishani
Okidoki, and what do u need more or what is not working with what u have already?
aniel
lovin
ok... i'll attached the db to be clear...
danishani
Okodoki, I see u have a login form, but its not act like a Login Form...
Take a look at this site to implement a Login Form idea. I can't explain it better myself... wink.gif
HTH
Daniel
lovin
Lol...thxs a lot... sorry coz i'm new to it...
danishani
No problem, If u have any question over whatsoever just ask in the right forum, and there are a lot of people more then willing to help you... wink.gif
oodluck! frown.gif
Daniel
lovin
Oh i tried to use the code given in the site , but it still does not work!!! I dun want any combo box for the User Name...can anyone help me?? i really need to know urgently...thxs
michaela4
Cheryl are you trying to open a form once the login is successful? I downloaded your sample but I don't see a form to open other than the login form.
ssuming you are going to open a form you should be able to us a dlookup to compare your UserId and Password.
On the afterupdate property of the password textbox on your form place this code...
if me.password = dlookup("pw","users","userid="& forms!Login!userid) then
docmd.openform "formname"
else
msgbox "You entered an incorrect Userid or Password. Try again"
me.userid.setfocus
endif
See if that helps, be sure and replace field names and form names to match yours in the code.
Michael
lovin
Hi Micheal...i really appreciate ur great help...thxs alot...ok there's an attachment here...yeah...after the users enter their User ID and Password, it will direct them to the Statistics form after successful login...how do i link them?
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.