Solved

VB4  Standard Edition

Posted on 1997-04-22
1
213 Views
Last Modified: 2008-03-10
I have Vb4 Standard edition.I was able to determine from the
online help that I cannot create objects like Database, workspace, etc. I'm limited to the Data object.
When I try to assign a new value to a field :
Data1.Recordset.MoveFirst
Data1.Recordset.Fields(1)="England"
Data1.Recordset.MoveNext
I get run time error 3020  "update without Addnew or Edit"

Why can't I modify the value of the field ?(field(1) is a
text field size 25"
According to the Programmers Guide this should work. Any ideas?
0
Comment
Question by:SFreitas
1 Comment
 
LVL 3

Accepted Solution

by:
rmichels earned 50 total points
ID: 1425604
After you do your MoveFirst to establish a current record you must use Data1.Recordset.Edit.  This then allows yout to assign data to the current record.  To update the row in the data table you use the Update method....Data1.RecordSet.Update.

Data1.Recordset.Addnew will create a new record in the table.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question