472,967 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,967 software developers and data experts.

OK button VB codes in login form

I have created the following tables:
tbl_users- username, userlogin, usersecurity & password fields
tbl_security- secid & securitylevel (1 for admin & 2 for users)
i have also created a login form with OK & Cancel buttons.
i have two text box in the login form:
1. login
2. Password
i want the following actions:
1. if either the login or password is typed wrongly a message is display.
2. if both are correct, then user can access specific forms, depending on the security level set for each. for Admin (1) access to say "switchboard" is granted & for user (2) access is grated to say "customer table".
3. after the login, the login form should be closed.
Oct 31 '17 #1

✓ answered by NeoPa

That wasn't a criticism of your question per se DUMS. I removed a post that answered your question in such a way as to leave you, and anyone using a system designed that way, exposed to severe criticism.

In the current climate security is a very important issue. Anyone storing passwords at whatever level has a responsibility to keep them very safe - as they may be a window into very much more than just your system.

It is a great deal safer for you, and anyone considering putting your own security process in place, to use a system already designed and available to you. One example is to get the UserName from the local security context (whether that be Domain or PC level) and allow/deny based on that. The Account used is easy to get (Function to Return UserName (NT Login) of Current User). Groups less so but can be done. My systems work this way. No passwords stored. I just get the account name and check for certain group memberships. For the account name to be available the user has already proven their bona fides by logging on in the first place.

If you create a basic system that stores passwords and someone breaks into that and steals the stored passwords then you can be found to be criminally negligent and hit with severe punitive damages. Most don't appreciate just how dangerous an area this is - and it's increasingly so as time goes on. This isn't going to go away.

So, beware what you ask for. You have been warned.

PS. Yes. Your question was asked well. You were just unlucky to stumble over an area of such importance and sensitivity that I was obliged to intervene (The last thing I wanted to do was delete a post from my good friend ADezii. He's been contributing on this site even longer than I have).

4 2545
NeoPa
32,547 Expert Mod 16PB
I'm a little surprised to see a solution suggested that has passwords stored and compared in the raw. That's a dangerous and irresponsible approach when you consider how many people use the same passwords for multiple systems. Yours could be the unlocked door that allows someone, without even any hacking skills, to take over someone's identity and ruin their life. I suggest that serious consideration be given before using any such system.

Sorry for expressing this so strongly, but this is a very serious issue and we at Bytes.com must be seen to take it seriously and handle it responsibly.

Someone asking such a question is far better advised to use existing security rather than trying to build their own. MS Domains, and even single systems, have security built in. It makes much better sense to use this than rolling one's own as it were. There are numerous examples of such questions already that are easily found with a little searching.

Unfortunately, there are also examples of routines written for the ones that ask the question instead of considered advice that pertains to their situation. Avoid these unless you want to end up on the wrong side of a big law suit, or even if the idea of causing such damage to someone else is not something you're comfortable with.

There are also articles available on Bytes.com that explain how to encrypt data in such a way that the password cannot be cracked, as well as explaining how best to make the comparison such that the unencrypted text is never stored anywhere.
Nov 1 '17 #2
just cannot really comprehend what you trying to come up with.
i have taken my time to simply explain what support i need- regarding codes for a login form.
simply expecting someone to help me along with the necessary code to accomplish the bullets above.
so what sparked up the issue of security breach.
anyway thanks.
cheers!!!
Nov 1 '17 #3
NeoPa
32,547 Expert Mod 16PB
That wasn't a criticism of your question per se DUMS. I removed a post that answered your question in such a way as to leave you, and anyone using a system designed that way, exposed to severe criticism.

In the current climate security is a very important issue. Anyone storing passwords at whatever level has a responsibility to keep them very safe - as they may be a window into very much more than just your system.

It is a great deal safer for you, and anyone considering putting your own security process in place, to use a system already designed and available to you. One example is to get the UserName from the local security context (whether that be Domain or PC level) and allow/deny based on that. The Account used is easy to get (Function to Return UserName (NT Login) of Current User). Groups less so but can be done. My systems work this way. No passwords stored. I just get the account name and check for certain group memberships. For the account name to be available the user has already proven their bona fides by logging on in the first place.

If you create a basic system that stores passwords and someone breaks into that and steals the stored passwords then you can be found to be criminally negligent and hit with severe punitive damages. Most don't appreciate just how dangerous an area this is - and it's increasingly so as time goes on. This isn't going to go away.

So, beware what you ask for. You have been warned.

PS. Yes. Your question was asked well. You were just unlucky to stumble over an area of such importance and sensitivity that I was obliged to intervene (The last thing I wanted to do was delete a post from my good friend ADezii. He's been contributing on this site even longer than I have).
Nov 1 '17 #4
I have to second Neo's reccomendation of pulling the logged in user. With all the passwords we are required to remember in today's realm - it's easier to use the measures in place already. Another positive aspect is you don't have to worry about lockouts and it takes a more "savy" explorer to figure out how to change permissions.
Nov 2 '17 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: | last post by:
Hi, I have a simple MDIChild login form that loads before the parent, and if the user hit's the cancel button on the login form, the whole app should unload. How can I do this? Thanks
7
by: Grant Merwitz | last post by:
Hi I am trying to get the enter key to submit my login form The login form is currently in a control on the page and uses an asp:imagebutton as it's login button. If a user presses enter...
7
by: Nerrad | last post by:
Hi, i am currently working on a project which requires me to create a form to allow the user to change their password. I know there is a user-level security login which is easier and safer but...
0
by: shangardezi | last post by:
hello im a noob in visual basic. I was wondering can someone help me to make a login form which sends all the information to my email. Any codes or anything? Just need something that will send the...
5
by: SagarDoke | last post by:
suppose there are 2 files "1.html" and "login.html". from "1.html" i am opening second page "login.html". "1.html" contain one button with value "signin". when i clicked on that button login form...
8
by: gamazone | last post by:
hi to all is it possible to auto fill and auto login the facebook login form? i am developing a web application in which , user will in put his,say for facebook, login information in his home...
1
by: ibsaqi | last post by:
Hello friends i am basically a new in programming language...i got readymade new login script and which i want to use for another form for my website.i.e Form that i want to use in my website...
5
by: lgoddgreat | last post by:
Hi I have this project currently on going and I'm stack in the login form, I've done most of the part but still i cant seem to find a solution to this part. the login form has 2 Textbox and 1...
4
by: ittechguy | last post by:
I'm trying to create a very simple login form. I need it to have a text box where a user can enter a password and login to the db. At which point, they'd have full access to read data, edit data, add...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.