im a beginner in programming, and im currently working on my first project which is the book borrowing system.
my only problem is that everytime i try to change the password of my system.. when i hit the cancel button the previous password disappears and u i can easily enter in the system without inputting password.where do u think is the problem?
thanks. -
Private Sub cmdCancel_Click()
-
If MsgBox("are you sure you want to cancel?", vbQuestion + vbYesNo, "Cancel") = vbYes Then
-
Data1.Recordset.CancelUpdate
-
normalButton
-
Call txtinactive
-
-
cmdEdit.Enabled = True
-
cmdSave.Enabled = False
-
cmdCancel.Enabled = False
-
Else
-
End If
-
End Sub
-
-
Private Sub cmdEdit_Click()
-
If txtuname = "Administrator" Then
-
MsgBox "Only Password can edit", vbInformation, "Borrower's List System"
-
txtuname.Visible = False
-
End If
-
Data1.Recordset.Edit
-
-
lblnew.Visible = True
-
lblpass.Visible = False
-
lbluser.Visible = False
-
txtuname.Visible = False
-
lblAdmin.Visible = True
-
-
-
Call add_record
-
txtpass = ""
-
txtretype = ""
-
txthint = ""
-
End Sub
-
-
Sub add_record()
-
txtuname.Enabled = False
-
txtpass.Enabled = True
-
txtretype.Enabled = True
-
-
cmdSave.Enabled = True
-
cmdCancel.Enabled = True
-
End Sub
-
Private Sub txtinactive()
-
txtpass.Enabled = False
-
txtretype.Enabled = False
-
End Sub
-
Private Sub normalButton()
-
cmdEdit.Enabled = True
-
cmdSave.Enabled = False
-
cmdCancel.Enabled = False
-
End Sub
-
Private Sub cmdMain_Click()
-
Unload Me
-
frmMenu.Show
-
End Sub
-
-
Private Sub cmdSave_Click()
-
If txtretype = "" Or txtpass = "" Or txthint = "" Then
-
MsgBox "Incomplete Information!", vbError + vbOKOnly, "Admin account"
-
ElseIf txtretype = "" Then
-
MsgBox "re-type password first", vbInformation + vbOKOnly, "Admin account"
-
ElseIf txtpass = txthint Then
-
MsgBox "You password and passwordhint must not be the same", vbInformation + vbOKOnly, "Password"
-
txthint = ""
-
ElseIf txtpass = txtretype Then
-
If MsgBox("Are you sure you want to save changes?", vbQuestion + vbYesNo, "Save Changes") = vbYes Then
-
-
Data1.Recordset.Edit
-
Data1.Recordset.Fields("Confirm").value = txtretype.Text
-
Data1.Recordset.Fields("Password").value = txtpass.Text
-
Data1.Recordset.Fields("Hint").value = txthint.Text
-
Data1.Recordset.Update
-
-
MsgBox "Account has been Successfully Updated.Program will restart to update your new password.", vbDefaultButton3 + vbMsgBoxSetForeground, " Account"
-
cmdEdit.Enabled = True
-
frmLogin.Show
-
Unload Me
-
-
-
Call normalButton
-
Call txtinactive
-
-
cmdEdit.Enabled = True
-
cmdSave.Enabled = False
-
cmdCancel.Enabled = False
-
End If
-
Else
-
MsgBox "password not match", vbInformation + vbOKOnly, "admin account"
-
End If
-
End Sub
-
-
Private Sub Form_Load()
-
lblAdmin.Visible = False
-
lblnew.Visible = False
-
-
Data1.Visible = False
-
-
End Sub
-
4 1251
Proggy,
It is difficult to follow your code to determine exactly what you are trying to do in it.
First, you give us no indicate what Data1 is or where it comes from. You also use a very unorthodox way of updating your data. It is not "wrong", just unorthodox and not very typical.
It does not appear that your form is simply built around a table with bound controls, but it is not clear from either your code or from your picture.
If anything, when changing passwords, you should verify all the information concerning the passwords before you save it to your table. That way if anyone cancels the action, there have not been any changes made.
Not sure if this helps much, but if you can describe in a little better detail how you want your project to work, we'll be glad to take a look into it.
this problem particularly refers to managing accounts of the administrator.but since this project can only be used by admin only password can be changed.
do u want to look on my project?
HI this is the project i made.
im not really a good programmer.
and im trying to improve my knowledge.
i hope u understand.
:)
Proggy,
We typically don't have Posters send in their projects, as usually threads deal with specific questions regarding one particular aspect of the project, rather than the project itself.
However, regarding your particular question, please let us know how your form is related to your table(s). At this point, we don't even know what your table(s) look like, and the structure will dictate how to solve your problem.
We are willing to assist, but we need more information.
If you want, you can take a look at this article ( How To Create User Permissions and Customized Menus in MS Access), which appears to be more involved than what you may want at this point, but would also point you in the right direction for user permissions.
Let us know how we can further assist.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Doug Bell |
last post by:
Hi
I am having difficulty getting a password form to work correctly.
I am using VB.Net.
The required functionality is to allow a change to a setting but when a save
button is clicked a password...
|
by: Gidrazas |
last post by:
Hello
I'm trying to generate DataSet from Sybase ASA 9 database. I'll use it in
Crystal Reports.
But when i'm trying to drag table from Server Explorer as written in...
|
by: Karl Burrows |
last post by:
Here's a simple script I have pulled from various sources and wondered if
there was a way to improve it. First, if the type the wrong password, I
would like to redirect them to another login page...
|
by: dcrespo |
last post by:
Hi all,
I have a program that serves client programs. The server has a login
password, which has to be used by each client for logging in. So, when
the client connects, it sends a string with a...
|
by: Per Schjetne |
last post by:
I set the "allow saving password" on the connection in the VS IDE/Data
connections. But after closing and reopening, the password and the "allow
saving password" checkbox is lost. I have this...
|
by: Neil G Jarman |
last post by:
Hi,
I would like to save my user's passwords as an encrypted sting.
Are their built in functions for doing this?
It's not financial data or anything, just to keep away prying eyes.
many...
|
by: chiefsitebuilder |
last post by:
I have a question about saving an MS Access program to CD and verifyng
that the program works after being saved.
Here is my situation, I have a person who developed an application for
me using...
|
by: Lucvdv |
last post by:
This would better be described by 'serialization' than 'interop', but I
didn't find a newsgroup that seems closer on topic.
The problem in a few words: I save data with DataSet.WriteXML, but I...
|
by: Punkis |
last post by:
Hello all.
I am having some questions about a subject.
I am running a small social community using SocialEngine and i want to include phpbb3 with an arcade mod or any arcade board that support high...
|
by: Jesse Jones |
last post by:
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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,...
|
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...
| |