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 1239
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: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |