Solved

I need more info on login/password file

Posted on 1998-11-05
3
139 Views
Last Modified: 2010-04-30
I have another question concerning my previous query on creating a login/password file. As I'm only a beginner, I would appreciate if anybody could answer this in simple coding.

I need to create a program that will:

* allow the user to enter a login and password
* check the login against a list of valid logins
* if the login is invalid, then display an error message and  allow re-entry
* if the login is valid, then check password
* if the password is invalid, then display a error message and allow re-entry.
* if password is valid, then display a message indicating success.

Note: two arrays should be used to store valid logins and passwords.

I would really appreciate any help on this question.
0
Comment
Question by:wdw1971
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Expert Comment

by:HOIMEI
ID: 1443268
Hi wdw1971,

   I have not see your previous query. I guess that you have add a login in dialog(built-in) from VB. (Select login dialog when you add file) Right?
 
If yes, it's easy to achieve it.
(You may store an  user and password in the same array )
When user press OK(click event),  you check through the array(s) for the user name and password. If success, you can unload the form(Unload Me).
If not success, you can pop error message. This will not unload the form.
Hope this help
0
 

Author Comment

by:wdw1971
ID: 1443269
Thanks for the reply, but I want to know how to use two arrays, as oppose to using one to store logins/passwords.


0
 

Accepted Solution

by:
HOIMEI earned 50 total points
ID: 1443270
Hi wdw1971,

  I think you should get all the user name and password at one query. And then assign it to the arrays sequentially so that the
password of the user in array 2 should have the same index of user name in array 1
You just search through the first array to check user name if not find then prompt error and then "exit sub"-- (skip the remaining parts")

If you find if you should store the index of it and then check the password in stored in array 2. If not match then prompt error.


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question