473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Update new Password to table via Forms & Macro

hi y'all!

i pretty much wanted to do a custom form where users can change their
password to the database as they like..

the problem i encountered is that it seems that when a valid user enter
their new password, the new password is not reflected in the respective
tables and after clicking the cmdChangePW, nothing happen despite me
puttin a msgbox "Password changed" after running the SQL.

I know access has a userlevel security, and i can't use it. Project
manager was afraid it would not be compatible with other computer
ourside the organisation..

Can anyone help me with this? Still quite unfamiliar with access,
thanxs lotsa!

Cheers!

i included the following:
txtusername
txtOldPw
txtNewPw
txtconfirmPw

and a command button, cmdChangePW
on the click event of the command button, i ran a macro which did the
following:
1) check any of the textboxes are null
2) check passwords are correct
3) run 3 SQLs
SQLs are like this [Do note that there are 3 tables containing 3
different userIDs and passwords to provide for different permissions
for different users]
UPDATE tblPasswordReceivi
SET tblPasswordReceivi.Password = '" & txtConfirmPW & "' WHERE
tblPasswordReceivi.UserID ='" & txtusername & "'";
UPDATE tblPasswordPurchase
SET tblPasswordPurchase.Password='" & txtConfirmPW & "' WHERE
tblPasswordPurchase.UserID ='" & txtusername & "'";
UPDATE tblPasswordMgmt
SET tblPasswordMgmt.Password='" & txtConfirmPW & "' WHERE
tblPasswordMgmt.UserID ='" & txtusername & "'";

Jan 16 '06 #1
6 1817
Pretty sure that your SQL statements need "Update [myTableName]" added at
the beginning of each to actually change the value of a field in an existing
record.
-Ed

"Darren" <Ye********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
hi y'all!

i pretty much wanted to do a custom form where users can change their
password to the database as they like..

the problem i encountered is that it seems that when a valid user enter
their new password, the new password is not reflected in the respective
tables and after clicking the cmdChangePW, nothing happen despite me
puttin a msgbox "Password changed" after running the SQL.

I know access has a userlevel security, and i can't use it. Project
manager was afraid it would not be compatible with other computer
ourside the organisation..

Can anyone help me with this? Still quite unfamiliar with access,
thanxs lotsa!

Cheers!

i included the following:
txtusername
txtOldPw
txtNewPw
txtconfirmPw

and a command button, cmdChangePW
on the click event of the command button, i ran a macro which did the
following:
1) check any of the textboxes are null
2) check passwords are correct
3) run 3 SQLs
SQLs are like this [Do note that there are 3 tables containing 3
different userIDs and passwords to provide for different permissions
for different users]
UPDATE tblPasswordReceivi
SET tblPasswordReceivi.Password = '" & txtConfirmPW & "' WHERE
tblPasswordReceivi.UserID ='" & txtusername & "'";
UPDATE tblPasswordPurchase
SET tblPasswordPurchase.Password='" & txtConfirmPW & "' WHERE
tblPasswordPurchase.UserID ='" & txtusername & "'";
UPDATE tblPasswordMgmt
SET tblPasswordMgmt.Password='" & txtConfirmPW & "' WHERE
tblPasswordMgmt.UserID ='" & txtusername & "'";

Jan 16 '06 #2
i dun get what ya mean..

One SQL is like this:

UPDATE [tblPasswordPurchase] SET [tblPasswordPurchase]![Password] = '"
& [Forms]![frmUpdatePW]![txtConfirmPW] & "'
WHERE ((([tblPasswordPurchase]![UserID])='" &
[Forms]![frmUpdatePW]![txtusername] & "'));

is anything wrong?

Jan 17 '06 #3
Oops, that wasn't visible in the copy that I read. Some of my apps do
something similar to yours, but I use a local table on each front-end to
store user name & password, then on start-up, just a simple log-on form that
checks the entry against those values.
-Ed

"Darren" <Ye********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
i dun get what ya mean..

One SQL is like this:

UPDATE [tblPasswordPurchase] SET [tblPasswordPurchase]![Password] = '"
& [Forms]![frmUpdatePW]![txtConfirmPW] & "'
WHERE ((([tblPasswordPurchase]![UserID])='" &
[Forms]![frmUpdatePW]![txtusername] & "'));

is anything wrong?

Jan 17 '06 #4
yep..i created three local tables and a simple log-on form and aft
that, i was wonderin how to create something to allow users to change
password anytime w/o administrator doin that..,

i created another form (details in my first post), and the problem i
encounter is that the update query seems not to be able to "pluck" out
the field (txtConfirmPW) from the form to update to the respective
tables.

It just doesn't work and i dunno why..can ya help me? Would it be
better if i send ya the database?

thanxs for that though..appreciate it!

Jan 18 '06 #5
Just guessing here, but are you sure that your form is still open when those
controls are trying to be read for the update query. Also, why use an
update at all. A bound form will simply overwrite the existing password
record with the new one. Set the form properties to: Edit=YESY, Add=NO,
Data Entry=NO.
-Ed

"Darren" <Ye********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
yep..i created three local tables and a simple log-on form and aft
that, i was wonderin how to create something to allow users to change
password anytime w/o administrator doin that..,

i created another form (details in my first post), and the problem i
encounter is that the update query seems not to be able to "pluck" out
the field (txtConfirmPW) from the form to update to the respective
tables.

It just doesn't work and i dunno why..can ya help me? Would it be
better if i send ya the database?

thanxs for that though..appreciate it!

Jan 18 '06 #6
i'm sorry i dun get what ya mean

if i were to do an update with a bound form, it would not have verified
whether the userID and password was valid..

I'm sorry coz i'm quite a beginner at dis...

Jan 24 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fredrik/Sweden | last post by:
Hi folks ! got this problem... i have a table 'Accounts' in my database, which contains a bunch of users. From the main menu i choose "edit user" and all users in the db are presented in a table....
7
by: andri.wardhana | last post by:
Hi Guys, I have a problem with my ASP file. since I'm all new in ASP, i found that the error statement generated by ASP is confusing. basically what I want to do in this script is ability to...
4
by: HEATHER CARTER-YOUNG | last post by:
Please help. I have two databases - one I'm designing that will be our in-house data mgmt system (db1) and another that is a federally-mandated system (db2). We must submit data from db2 but don't...
2
by: Joe Fetters via .NET 247 | last post by:
Have googled and read the VS.NET documentation can't seem to getthe answer to the following. Environment: Framework 1.1 VB.NET WinForm Access database Using all automagic tools (DataAdapter...
7
by: Nerrad | last post by:
Hi, i am currently working on a project which requires me to create a form to allow the user to change their password. I know there is a user-level security login which is easier and safer but...
15
by: Darren | last post by:
Help, i want to run an update query from a form.. and was wonderin.. Can the update query run if i want to update a value manually inputted from a form (e.g. !!) to a table...
0
by: Access Programming only with macros, no code | last post by:
ERROR MESSAGE: Could not update; currently locked by another session on this machine. BACKGROUND I have the following objects: Table1 - HO (which has about 51,000+ records) Table2 -...
3
by: dhaneshrs | last post by:
I have a gridview i managed to update using the edit option in the smartmenu. The problem comes when i delete a value or make a value read only. Say i have a table Employee with the following...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.