473,385 Members | 1,757 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,385 software developers and data experts.

UPDATE query: too few parameters

I'm trying to update a field in a table named tblPeople from data contained in a field on a form. The following is what I have but it keeps telling me I have too few parameters, can anyone help?

Expand|Select|Wrap|Line Numbers
  1. Dim CurDb As Database
  2.     Dim SQL As String
  3.  
  4.  
  5.     Set CurDb = DBEngine.Workspaces(0).Databases(0)
  6.     SQL = "UPDATE tblPeople SET password = Forms!frmUserChangePass!NewPass WHERE tblPeople.[PEOPLE_ID]=[Forms]![frmLogin]![id_list]"
  7.     CurDb.Execute (SQL)
  8.     CurDb.Close
Sep 26 '07 #1
2 1669
Scott Price
1,384 Expert 1GB
You asked a question in a tutorial on the Access Articles page. This breaks several rules of common sense! Number one is that very few people are likely to see the question in order to answer it!

I have split your question into a separate question and moved the thread into the Access Forum, where our Experts will be more likely to see it and answer it.

Please avoid posting your question in another persons thread in future.

MODERATOR
Sep 26 '07 #2
Scott Price
1,384 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. SQL = "UPDATE tblPeople SET [password] =" & Forms!frmUserChangePass!NewPass & "WHERE tblPeople.[PEOPLE_ID] =" & [Forms]![frmLogin]![id_list] & ";"
Try something along these lines.

Regards,
Scott
Sep 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: vjmehra | last post by:
I have a datalist within a datagrid and I am having trouble trying to get the update command working. I am only using the one for the datagrid, but this should also update the datalist, however...
6
by: David Shorthouse | last post by:
Hello folks, I have a problem with an update query on an asp not updating the table in an Access db. The code runs, I have no errors, but when I examine the table, nothing was updated. The query...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
6
by: Nicolae Fieraru | last post by:
Hi All, I was trying to update a field in a table, based on the results from a query. The table to be updated is tblCustomers and the query is qrySelect. This query has two parameters, provided...
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...
3
by: Russ Green | last post by:
I am currently learning asp.net (vb) with Web Matrix. I am building an intranet page that will have an editable datagrid on it. I have got the datagrid to populate OK but I cannot get the Update...
4
by: René Kabis | last post by:
People, I am at my wit's end. I am using the exact code from http://aspnet.4guysfromrolla.com/articles/071002-1.aspx And yet, the code does not manage to update the database. When I go to...
3
by: Shapper | last post by:
Hello, I have created 3 functions to insert, update and delete an Access database record. The Insert and the Delete code are working fine. The update is not. I checked and my database has all...
8
by: rriness | last post by:
I'm getting an inconsistent failure when trying to save data in ADO.Net. I'm using an Access database with a simple query - SELECT StudentID, FirstName, LastName FROM Students - and have no...
1
by: giovannino | last post by:
Dear all, I did a query which update a sequence number (column NR_SEQUENZA) in a table using a nice code (from Trevor !). 1) Given that I'm not a programmer I can't understand why...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...
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...

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.