Any ideas on how to send info from one form into another domain or how to write a default value for a new user's password with a formula?
Here's what I'm trying to do: design my database so that a new employee record has a password generated with a formula (obviously, not one that is published). On the employees table is a true false declaring if the user's password needs changed. The default value is true. So when I create a new record (add an employee to the table) he is given an unguessable (but not actually random) password and the tables marks his password as needing changed.
Now, on the login form, the command button checks if that user's password is marked as needing changed. If it is, it closes the login form and opens the change password form. What I need the command button on the change password form to do is change the value if the user's password (from the auto-calculated one) to the one he entered in the change password form AND to change the true/false value on that user's require change password box to false. Make sense?
So
1. How do I make the default password = to a formula (like the date the employee was added and their initials, etc) and
2. How do I code the command button on the change password form do the saving if the info change like I described earlier? Any tips?
7 4393
Jesse,
I understand exactly what you're trying to do, and I know how to do it, but unfortunately I don't know the code for it. You want to concatenate your fields. Concatenate means to "add" your fields together. So basically it'll look like this:
"date" + "initials"
that will show up as 010811ml
something like that. Now as I've said, I don't know the code for it, but that's the concept that you need.
Sorry I couldn't be of more help.
Thanks, Marty. How would you do it? The only reason I think I don't actually need code to originate the password.
Also, do you know the code that changes the value of a field in another table? (On my employee table, there is a yes/no that decides if the employee needs to be forced to change their password. If it says yes, they are redirected to a password change form. What I need is for the command button on that password change form to 1. set the password in employees = the password they just entered on the change form and 2. change the value of that yes/no to no.) Anyone have any suggestion?
I am unsure if this is the answer you are looking for but it is what I do for my database and it runs a lot smoother than trying to generate random/unique passwords.
Whenever I add a new person to my database the default password is set to "Password".
In my login form I check the entered password (as you do). If this password is = to Password I redirect the person t the "change password" form. I use a simple message box to display "Since this is the first time you have entered the databse, using the default password you are now required to change this." or similar.
It saves a lot of headaches generating new passwords etc when realisticly it is easier to let people all use 1 password to login for the first time and then ensure they change this to something else.
Okay, munkee, thanks. I used to do it that way, but we had a problem with people overwriting other people's passwords. Not everyone has the same permissions in the database. So when I hire someone into database development with near total access, I don't want people in communications to be able to change the new guys password. Make sense?
Thank you for your thought. You could be a huge help to me though by perhaps sharing with me what you have done with you password change form. I assume its a modal form with a command button...? What is the coding on that button that changes the users password? I mean, how do you automatically save their new password?
Any help would be greatly appreciated. I am basically a novice in this.
I'll post some code in the morning
Rabbit 12,516
Recognized Expert Moderator MVP
As far as security goes, you may want to take a look at this thread. http://bytes.com/topic/access/insigh...atabase-access
For a default password, I assume you have an add employee form. I would put a button on there that sets the password.
As for the password change, when they click the log in, I would use a dloopup to check if they need to change their password. If they do, I would open up a modal form for them to change their password. When they click a change password button, it would run an update SQL.
Here are the two sets of code I use.
The first is to validate a user login and to check if they have their password set to "Password" to redirect them to the change password form. - Private Sub cmdOk_Click()
-
On Error GoTo Err_cmdOk_Click
-
'-----------------------------------------------------------------------------------------------------------------------------
-
' This code is used to validate users found in the tblSecurity table. If the wrong user name or password is
-
' provided access is denied.
-
'-----------------------------------------------------------------------------------------------------------------------------
-
Dim db As DAO.Database
-
Dim rst As DAO.Recordset
-
Dim rstV As Recordset
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
Set db = CurrentDb()
-
Set rst = db.OpenRecordset("tblSecurity", dbOpenDynaset)
-
-
If Not IsNull(Me.txtUser) And Not IsNull(Me.txtPassword) Then
-
rst.FindFirst "Password = '" & Me.txtPassword & "'" & " And UserID = '" & Me.txtUser & "'"
-
-
If rst.NoMatch Then
-
MsgBox "You entered the wrong User Name or Password." & Chr(13) & _
-
"Please enter the correct User Name and Password or " & Chr(13) & _
-
"contact the Database Adminstrator for assistance.", vbOKOnly + vbCritical, "Logon Denied"
-
ElseIf Me.txtPassword = "password" Then
-
MsgBox "This is the first time using the database or your passowrd has been reset." & Chr(13) & _
-
"You must change your password before you can enter the database.", _
-
vbOKOnly + vbExclamation, "Change Password"
-
stDocName = "frmUserLogonNew"
-
stLinkCriteria = "[UserID]=" & "'" & Me![txtUser] & "'"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
Else
-
stDocName = "frmSplashScreen"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
Me.Visible = False
-
End If
-
Else
-
MsgBox "You left the User Name and/or Password blank." & Chr(13) & _
-
"Please enter the correct User Name and Password or " & Chr(13) & _
-
"contact the Database Adminstrator for assistance.", vbOKOnly + vbCritical, "Logon Denied"
-
End If
-
-
-
With Forms!frmhidden
-
.txtViewID = rst.Fields("ViewID")
-
.txtAccessID = rst.Fields("AccessID")
-
.txtActive = rst.Fields("Active")
-
.txtPassword = rst.Fields("Password")
-
.txtUserID = rst.Fields("UserID")
-
.txtSecurityID = rst.Fields("SecurityID")
-
.txtFName = rst.Fields("FName")
-
.txtSName = rst.Fields("SName")
-
.txtEMailAd = rst.Fields("EmailAd")
-
.txtUDept = rst.Fields("UDept")
-
End With
-
-
-
-
-
Exit_cmdOk_Click:
-
rst.Close
-
Set rst = Nothing
-
Set db = Nothing
-
Exit Sub
-
-
Err_cmdOk_Click:
-
Me.Visible = True
-
MsgBox Err.Description
-
Resume Exit_cmdOk_Click
-
-
End Sub
The second part of the code is my change password form allowing users to supply a new password twice and update their info: - Private Sub cmdOk_Click()
-
On Error GoTo Err_cmdOk_Click
-
'-----------------------------------------------------------------------------------------------------------
-
' This code is used to change the user password in the 'tblSecurity table.
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
If Not IsNull(Me.txtNPassword) And Not IsNull(Me.txtCPassword) Then
-
If Me.txtCPassword = Me.txtNPassword Then
-
stDocName = "qryUpdateUserPassowrd"
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
DoCmd.SetWarnings True
-
MsgBox "Password was successfully change", vbOKOnly + vbInformation, "Password Changed"
-
stDocName = "frmSplashScreen"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
Else
-
MsgBox "New password and confirmation do not match." & _
-
Chr(13) & "Please enter the correct password and confirm", vbOKOnly + vbInformation, "Incorrect Password"
-
End If
-
Else
-
MsgBox "You left the User Name and/or Password blank." & Chr(13) & _
-
"Please enter the correct User Name and Password or " & Chr(13) & _
-
"contact the Database Adminstrator for assistance.", vbOKOnly + vbCritical, "Change Failed"
-
End If
-
-
Exit_cmdOk_Click:
-
Exit Sub
-
-
Err_cmdOk_Click:
-
MsgBox Err.Description
-
Resume Exit_cmdOk_Click
-
-
End Sub
The query the above references to has the following sql: - UPDATE tblSecurity SET tblSecurity.[Password] = Forms!frmUserLogonNew!txtCPassword
-
WHERE (((tblSecurity.UserID)=[Forms]![frmUserLogonNew]![txtUser]));
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: MLH |
last post by:
What's the simplest way to allow a user
of an A97 app to change password?
|
by: Fabrizio |
last post by:
(Sorry for the crosspost, but I really don't know which is the right
newsgroup!)
Hi all,
I try to change the password to a user that as to change the password at
first logon:
try
{
|
by: Ram |
last post by:
Hey,
I'v managed to set the "User Must Change Password At Next Logon" flag on the
LDAP protocol,
Using the - "pwdLastSet" property - by setting it to - "0" (for on) or -
"-1" (for off).
The problem is, I dont know how to check what's the current status of this
user -
When I try and read this property from the user's DirectoryEntry,
I get a "System.ComObject" object, and I cant get any data from this object.
Does Anyone has an idea what...
|
by: Pavan |
last post by:
Hi All,
I am using Password Recovery control in order to reset my hashed passwords
in ASP .Net 2.0 Beta 2.
The system generated password is too difficult to remember, so i am giving
Change Password, support to the user.
Now my current task is
|
by: a_hartmann_andersen |
last post by:
Hi Guys
Here is the problem: Im bored changing the local administrator password
for a set of servers in a domain.
So I though that I would write myself a little tool in C# to do that.
I found bits and pices but the subject, but not anything solid. Ofcause
its out there :-) can anybody help me out on this.
Thanks!
| |
by: arad |
last post by:
I'm adding some pages to a website for a client and one of the options the client wants is for his employees to be able to login into a separate page for employees only, where they can retrieve information such as monthly schedules, etc. The person who created the website originally had made a link that would take you to that page. When you click on the link it prompts you to enter a password, but when you're entering the password you can...
|
by: roshina |
last post by:
Hi
Iam facing a problem in my project, developing a web site for online shopping in ASP on windows XP using IIS server.
All the validations are ok but the new password is not upadated in the data base and also showing a error page.
the operating system we used is Windows XP,
the source code is ASP,
front end we used - HTML and
javascript and vb script for validations.
the inputs we used are :
old pasword :
|
by: parshupooja |
last post by:
Hi
I have created a login page which has user name n password. After entering values it authenticate from SQL Server and if it is correct, it forwards to designated page otherwise shows invalid login message. i have 5000 users in my system, so i opted this way. Now i want ot create a button on login page which shows change password. I want to replace my old password field value with new password field. I don't want to create another column...
|
by: matheussousuke |
last post by:
Hi, guys, I'm developing a script and it's almost done, just left two little things:
Forgot password option
Change password option
About forgot password: The user can use as many user names under the same email adress, so the system needs a way to send the password for user email when user type the user name on field of forgot password.
I'm running it under php 4, so don't worry if u see a $HTTP_POST_VARS. :)
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |