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

vb6 adodc1.recordset.addNew error

28
the following code works but if I try to add a second record it erases the first record in the database (using Access DB)

Expand|Select|Wrap|Line Numbers
  1. ...
  2. Me.Adodc1.Recordset.AddNew
  3.     Me.Adodc1.Recordset.Fields("Account").Value = Me.txtACNum.Text
  4.     Me.Adodc1.Recordset.Fields("Title").Value = Me.cboTitle.Text
  5.     Me.Adodc1.Recordset.Fields("First_Name").Value = Me.txtFName.Text
  6.     Me.Adodc1.Recordset.Fields("Last_Name").Value = Me.txtLName.Text
  7.     Me.Adodc1.Recordset.Fields("Address").Value = Me.txtCAddr1.Text
  8.     Me.Adodc1.Recordset.Fields("Address2").Value = Me.txtCAddr2.Text
  9.     Me.Adodc1.Recordset.Fields("Parish").Value = Me.cboCParish.Text
  10.     Me.Adodc1.Recordset.Fields("Telephone").Value = Me.txtCTel.Text
  11.     Me.Adodc1.Recordset.Fields("CEmail").Value = Me.txtCEmail.Text
  12. Me.Adodc1.Recordset.Update
  13. Me.Adodc1.Recordset.Requery
  14. Me.Adodc1.Recordset.MoveFirst
  15.  
  16.  
Aug 30 '10 #1
0 1662

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

Similar topics

2
by: sunj | last post by:
My database completely works in Dreamweaver MX at a local testing level, but as soon as I upload and access my web pages remotely I get this error on the browser. Can anyone help?...
2
by: Harold | last post by:
Sat I have a customers table with the fields CustomerID and Customer and I use the recordset.addnew method to add a new record to the table. What is the best way to get the CustomerID of the new...
4
by: linda williams via AccessMonster.com | last post by:
The code creating the recordset that is commented out below works on all my user's machines except two. What is especially irritating is that this code did work on one of their machine for several...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
1
by: | last post by:
I am trying to add a new record to an odbc data base. I am using MS ActiveX library2.8. The syntax is recordset.AddNew (object fieldlist, object values). Object fieldlist and values can be one...
5
by: tony010409020622 | last post by:
I just spent 4 months taking a dotnet class where i learned very little. One of the things I did not learn is this: What are the dotnet equivilents of commands such as: Adodc1.Recordset.AddNew...
1
by: Murtaza | last post by:
Hi all Looking for assistance on an issue in Excel (2000 sp2 / pro) and access 2003. I have a database and in my VB code have created a ADODB.connection to it. It is called conn. I have used it...
7
by: michal | last post by:
hi guys, i am using postgres 8.2 and try to add some records to a table with ADODO ... unfortunately i end up with an error when calling the addNew() method. it says that the recordset does not...
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hello every body I have a problem. When i want to add a record. and its sub record an error is occured. "Operation canceled" I have made an record with reg no of 3 and have to update its sub...
2
by: Kamil | last post by:
Hi. Is it possible to add new record to my recordset which is based on a query? I want to use this recordset only for temp starage of data, and I don't want to update values from this recordset...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.