Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a table through a form

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi,

I am trying to update the user table while changing a password. The code is goes like this:

strSql = "UPDATE Users SET Users.[Password] = 'UCase(txtPwNew)' ," _
& " Users.Password_Chg_Date = date " _
& " WHERE (((Users.Password) = 'UCase (txtPwNew)') " _
& " AND ((Users.User_name) = 'txtUserName'));"

Set db = CurrentDb
db.Execute strSql

But I am getting an error that says

"Too few parameters. expected 1."

Please help

Also, does the date function returns the current date?

Thanks

Mo
 
Date will not return the current date in SQL you are going to need to use sysdate and most likely make sure that you format it accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top