Forms :: Complex Password Validation
Jan 6, 2014
I am looking to ensure the user enters a complex password, in the add user form. Therefore, the password should be >8 characters, 2 numbers, 1 Ucase min, 1 Lcase min and some form of punctuation. I found this code:
unction ValidatePassword(ByVal pwd As String,
Optional ByVal minLength As Integer = 8,
Optional ByVal numUpper As Integer = 2,
Optional ByVal numLower As Integer = 2,
Optional ByVal numNumbers As Integer = 2,
Optional ByVal numSpecial As Integer = 2) As Boolean
[Code] ....
but obviously this doesn't work in access. How can i either change it to work for microsoft access, or how would i go about developing it. What would the code be?
View Replies
ADVERTISEMENT
Jan 6, 2014
I am looking at the public function routine, that validates the password entry. I want to know how i can make a message pop up with the specific error the user has made on entry.
Public Function ValidatePwd(varPassword As Variant) As Boolean
Dim blnValid As Boolean
Dim blnValidCriteria As Boolean
Dim intChar As Integer
blnValid = Len("" & varPassword) >= 4 And Len("" & varPassword) <= 12
[Code] ....
View 11 Replies
View Related
Jul 18, 2006
Came across this and modified it so that it checks if the password entered has at least one number or symbol.
(a function to be placed in a global module not macro)
Code:Function IsAlphaNumeric(strTest) As Boolean'IsAlphaNumeric used to test if a string has a number or a symbol in addition to regular alpha characters.'What it does it take an input string and converts each character of the string into its corresponding ASCII code (uses the VBA function Asc()).'The function then checks the ASCII value of each character and adds one to count if the character was a number or symbol.'The function also checks the ASCII value of each character and adds one to count2 if the character was a regular alpha character.'Finally the function checks to see if count and count2 are both greater then 0, if it is then the string has a number or a symbol in addition to regular alpha characters.Dim Char As StringDim CharNum As IntegerDim i As IntegerDim count As IntegerDim count2 As Integercount = 0count2 = 0 For i = 1 To Len(strTest) Char = Mid(strTest, i, 1) CharNum = Asc(Char) '48-57 is the ASCII range for 1-0, the other values are for the following symbols ~ ! @ # $ % ^ & * ( ) ` If (CharNum > 47 And CharNum < 58) Or (CharNum = 33) Or _ (CharNum > 34 And CharNum < 39) Or (CharNum > 39 And CharNum < 43) Or _ (CharNum = 64) Or (CharNum = 94) Or (CharNum = 96) Or (CharNum = 126) Then count = count + 1 End If '65-90 is the ASCII range for A-Z, 97-122 is the ASCII range for a-z If (CharNum > 64 And CharNum < 91) Or (CharNum > 96 And CharNum < 123) Then count2 = count2 + 1 End If Next i If count > 0 And count2 > 0 Then IsAlphaNumeric = True Else IsAlphaNumeric = False End If End Function
I use it when the user wants to change the password for the local front end db. It makes sure that the user has to have a password at least six characters in length and must have a symbol or letter.
Code: If newpass = Me.currpw.value Then MsgBox "Password cannot be updated. Please make sure the new password is different from the original password", vbExclamation, "Password update FAILED!" Exit Sub End If If Not newpass = Me.confrimpw.value Then MsgBox "Password cannot be updated. Passwords do not match, please make sure to re-enter the new password twice.", vbExclamation, "Password update FAILED!" Exit Sub End If If Len(newpass) > 6 And IsAlphaNumeric(newpass) Then 'Update current user's password DoCmd.RunSQL ("UPDATE Users SET [strEmpPassword] = '" & newpass & "' WHERE [lngEmpID] = lngMyEmpID;") MsgBox "Password has been updated ", vbInformation, "Password updated!"
With this you can expand it so that if you want the user’s new password to have at least one number and one symbol
One thing I am not sure about is to make sure the password is a strong password and not a weak one. I was thinking of having it subtract the ASCII code of every two characters and if there value is 2 or less add one to a general count variable, then divide that general count variable by the number of iterations and check to see if that value is 2 or less if so then it’s a weak password, not sure if that makes sense, any ideas?
View 3 Replies
View Related
Sep 24, 2013
How to validate a MS Access password text box as criterion below?
(i) At least one uppercase
(ii) At least one lowercase
(iii) At least one number
(iv) Password length 8 - 12
View 1 Replies
View Related
Oct 24, 2014
i have found a code that brings up a box when tab or clicking in to a box for editing as below:-
Dim strPassword As String
If InputBox("Please enter the password:") <> strPassword Then
SomeOtherControl.SetFocus
TextBox1.Locked = True
End If
its just that need to add a password as well, i have tried to put this in between the <> but this does not work. i would like a message to say incorrect password as well if possable.
View 4 Replies
View Related
Mar 3, 2005
I have a complex form (in that it contains a lot of VB code and events) to display the information of various articles in my database. I would like to add some browsing options to the form (like a list of all articles on the left, and some different back/forward options), but I also need to preserve the form in its current state.
Rather than make a new copy of the form (and have to maintain TWO near-identical copies of the same form), I attempted to make a new form, with just the browsing list, and insert the old article information form as a subform on the left. However, it seems that any of the code from the original form which refers to Forms!Article Information!Article_ID ("Article Information" is the name of the original form) are not able to load the correct information, as I am prompted to supply it myself. Needless to say, I don't want the user to be prompted for the article number each time they open the form :).
I'm wondering how I would go about opening the old form as a subform in such a way that I am not prompted each time. Or alternativley, if there's a better way to do what I'm trying to do, how should I do it?
View 7 Replies
View Related
Dec 8, 2014
I have a form with 47 subForms, and Form.Controls.count is 351. The sub forms were originally text boxes, which got changed to ListBoxes because of customer requests, then to subforms because of conditional formatting needs that the customer wanted. Now, when it is open, other forms give sporadic "System Resources Exceeded" errors. I'm pretty sure it is this form that is causing the errors, as it is always open when they occur. (Only consistent factor.) Task Manger - Processes shows that closing this form releases 723 "User Objects", and almost 400 GDI objects.
Is it time to switch to a different development tool? Visual Basic? C++. Is it possible to rewrite the single form as a standalone and keep using the rest of the Access App? (Almost 60,000 loc in 200 objects.)
View 1 Replies
View Related
Jul 29, 2015
I am building a very comprehensive Membership Management Database with extremely useful facilities initiated by some 20 or 25 Queries..
The database includes 5 Tables which store data relevant to members, another which stores details of Interest Groups and a 3rd which stores which members are affiliated to which Group or Groups.
Currently the database is accessible only by a very limited number of persons and data can be entered/edited by only one person. The database, using Access 2010, is maintained on a desktop computer and synchronized to a copy on a Cloud.
My requirement is to permit some 50 Group Leaders to input/edit data on a Password protected Group Members Form such that that is the only element of the database that they can access. The Forms would have only 2 fields from which the user would select entries from drop down lists.
My query is ; is such a procedure feasible in principle and would I be correct in assuming that the user would require to have available a copy of Access.
View 7 Replies
View Related
Mar 29, 2007
I have recently split my database and added a password to the back end. I am now trying to re-link the tables as I have seen in other threads, but when I do this I am not prompted for the password I just get the message 'Not a valid password'
I must obviously be doing something wrong, can anyone help?
View 4 Replies
View Related
Apr 4, 2008
hi, i am currently working on a computing project using access 2003, and i am not very familiar with VBA.
At the moment, i have designed a simple logging-in form (with a function that checks the password typed in for a username (selected from a combo box) against the password value stored in a table
Is there a function in visual basic access where each time a user logs in, the date (and date) is recorded into the table where the user details and passwords are stored?
help would be much appreciated
View 2 Replies
View Related
Nov 8, 2005
Hi,
Firstly thank you for your help, this should be a simple one I hope, but is cracking my head on the wall. Have searched and searched and can't find an answer.
I have an Access Db that is not password protected, but is asking for a password.
It opens on any other machine fine?
I think my version of Access is playing funny buggers with me, any suggestions?
I was trying to implement some security on this Db, which is why it happened I'm sure. I ran the security wizard, set-up two users and admin with passwords, I have the output file to "recreate" something too.
Issue is, I then copied this Db to another computer for use on there, it worked without a Password, so didn't need to worry about it, now I can't open any Db on my machine??
Your help on this obvious pointer would be great!
C
View 3 Replies
View Related
Sep 12, 2006
hi pals
i have set username and password for ms access file.
unfortunately i have forget that password?
how to crack that username and passowrd?
is there any softwares available?
i can easily crack the database pasword? but how to crack username and password of ms access file.
View 1 Replies
View Related
Jun 13, 2006
how can i password protect a form?
i want a have a button that on click will ask for the password. if the password is correct then proceed to open the for else tell them they are not authorized.
i know i would need an if statement but thats as far as i got..
can some one provide me with some sample code?
thanks
View 4 Replies
View Related
Sep 18, 2006
Hi,
I need some help creating a way for two different type of users to be redirected to different forms after entering a password.
I tried using the groups security in access but it's not good.
What I need the program to do is:
ask the user to enter a password. then if the password is correct and they are managers they will see the managers opening form ("form1") and if they are employees they will se a different opening form("form2") with less options and different reports.
thanks.
View 4 Replies
View Related
Oct 18, 2005
I have created a login form, with a user name and password. It works great. However I need to use the login form for three different command buttons, on my main access form. The same login form will be used but It will need to open three different forms depending on what command button was selected on the main page.
Main page- PID
3 command buttons- building, documents, assessments
login form- login
3 documents- build, docs,assess
I open main page, PID- click on buildings the login form pops up and I enter the correct username and password the building doc opens. Got it?? The same process for each, I would like to know how is this possible? How do I change the differnt documet that opends according to the command button that has been pushed? :confused: Thanks in advance
View 10 Replies
View Related
Mar 18, 2005
I have set up a front screen which has linked buttons to other forms.
When I open up some of the forms (using the buttons) I would like them to be password protected.
I know tihs is probably really easy, but I cant get it sussed!!
Any help would be appreciated.
thank you
Mojaveboy
View 2 Replies
View Related
Sep 9, 2013
I have written the following code on a command button to set up a basic password for deleting current record. What I really want to do is hide the password being typed into the input box with asterix's. Here is the current code and password:
Private Sub Toggle33_Click()
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
[Code] ....
View 5 Replies
View Related
Nov 2, 2014
I have an error message or debug message in my code in username & password log in.. it has an error in if else statement
empname is a cobobox
empass is a txtbox
logempID is a autonum I.D
usrnmpass is a table name
there's an specific record in a table of usrnmpass showing in the attachment
this is my code....
Private Sub Command1_Click()
If IsNull(empname) Or empname = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
empname.SetFocus
Exit Sub
End If
[code]....
View 14 Replies
View Related
Jul 19, 2015
I am doing an assignment and I am stuck at this validation rule. So in my database I 've got one table named horse and the rules I am supposed to set are these two:
1:A horse cannot be added that does not already have a Dam and Sire existing in the database unless either or both are not known.
2:A horse must not be deleted if it is the Sire or Dam of an existing horse.
I guess I am supposed to create a data entry form for table horse and apply these two rules in the form, but what should I do to achieve that? Seems a bit complicated cause the entering need to check some other fields (sire and dam) in the table..
My table looks like this
Horse_id Name Colour Sire Dam Born Died Gender
101 Flash white 201 301 2001 0 S
102 Star brown 201 302 2002 0 M
201 boxer grey 401 501 1991 0 S
301 Daisy white 401 502 1992 0 M
I know it might seem too simple to you but I am a full-time worker doing this online course. The consulting resouce for me and the time are both quite limited.
View 2 Replies
View Related
May 9, 2013
I have a login button in which if the username has an empty password or the user is his/her first time to login, another form will appear which is the Set New Password. How can I change the password of that current user, my Set New Password Form has two fields which is 'txtSetPassword1' and 'txtSetPassword2' and an OK button.
The user must enter a new password and a verification password, if the 2 fields matched, the new password entered will change the password in the table. The table name is 'tbl_UsernamesQry'.
I have done it but the main problem is, it changes the other's users password not the current user.
Here is my code for the OK button of that form Set New Password:
Private Sub btnSetOk_Click()
If Me.txtSetPassword1.Value = Me.txtSetPassword2.Value Then
Me.txtSetPassword1.SetFocus
[Code].....
View 11 Replies
View Related
Jul 15, 2013
I have a checkbox that when checked will close that particular record from future editing. I want to be able to password protect this checkbox. Also I want to be able to uncheck this box with a password if we need to reopen that record.
View 2 Replies
View Related
May 25, 2013
I am trying to set password protection on a combobox where there are only a few people who I want to be able to select their name to provide authorisation. I found the below code on a website and modified it slightly for my table (tbl_Approval) that contains two fields; Approver and Password. I can see how the code is supposed to work however I keep getting a syntax error (missing operator) in query expression on line: Set rs = CurrentDb.OpenRecordset(sql).
Code:
Private Sub Approved_By_Enter()
Dim pwd As String
Dim rs As Object, rstable As Object, count As Integer, counter As_ Integer
Dim sql As String, recount As Integer
sql = "SELECT * " & "FROM [tbl_Approval] " & "WHERE [Approver]= " & Me.Approved_By
Set rs = CurrentDb.OpenRecordset(sql)
[Code]...
View 3 Replies
View Related
Feb 26, 2015
I have a form called departments . one that form i have 5 buttons. I want this form only to open when some logs onto the database . The buttons represent each department ...
1. sales
2 purchasing
etc etc
Is it possible to assign a password to those buttons so each department has security to their own form ...
View 8 Replies
View Related
Mar 12, 2014
I am trying to set up a password on a for different users to have to enter pins to enter data. When a user selects his/her name from the combo box the next field will be something like pin. When they enter the corresponding pin this will allow them to edit and start or continue (if they left) fill out the rest of this form.
The reason being this way is that if one of them goes back to a previous record done by another user (which I want them to be able to view) they can view it but cannot edit it because they do not have the users pin (or password). Is this able to be done, only allowed to edit or create a new record if you enter your pin every time.
View 4 Replies
View Related
Aug 7, 2015
Access 2007 / I'm creating a database form that has a combo box drop down pulling EmployeeName and a free text field to enter a password. I need the password entry validated against the password stored in a column on the same row as the Employee Name selected from the combo box when a button is clicked. . IF, that value is validated, I need the button click to also record a "time in" or "clock in" entry in a different table.how to validate the password.
View 3 Replies
View Related
Jul 31, 2013
Is it possible to put password for a tab in Access 2010?
View 14 Replies
View Related