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

invalid operation



CaN somebody help me find the error in my code ? I get the error
"invalid operation" with the following line :

tdf.Fields("CustomerID") = 121

Public Function Test()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim fld As DAO.Field
Dim tdf As DAO.TableDef

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("orders1", dbOpenDynaset)
Do While Not rst.EOF

rst.MoveNext
Set tdf = dbs.TableDefs("Orders1")

Set fld = tdf.Fields("CustomerID')
tdf.Fields("CustomerID") = 121

Loop

rst.Close
Set rst = Nothing
Set dbs = Nothing
End Function

Dec 14 '05 #1
1 3263
try
Do While Not rst.EOF

rst.Edit
rst.Fields("CustomerID")=121
rst.Update
rst.MoveNext

Loop

Dec 14 '05 #2

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

Similar topics

21
by: Allin Cottrell | last post by:
OK, I realize that what I am asking here is not likely to have a answer within the C standard. Nonetheless, it is not specific to any particular platform, so I'll hazard the question anyway. A...
0
by: John Jenkins | last post by:
Hi, can anyone shed some light on an issue I have encountered. I have used a tool (Cape Clear) to generate a WSDL file for me. When I use the WSDL2Java tool provided by apache axis it creates...
2
by: jawilson | last post by:
Hello, I am working on a project in Borland Developer Studio 2006, and am running into an error I don't understand. Here is the relevant code: ...
0
by: colt | last post by:
I have a query that is pretty straightforward and I am trying to generate 5 reports from that query. The reports produce totals by Project Manager, Category, Client, Account Manager and Account...
0
by: cclwebmaster | last post by:
When running the following code from our Web site at http://www.corporateconnectionlines.com we get this error message: Error Type: ADODB.Connection.1 (0x800A0E78) Invalid operation on closed...
5
by: praveen | last post by:
Hi, I am using nested resultsets to execute queries on two different tables. The code structure is: stmt1 = conn.createStatement(); rs1 = stmt1.executeQuery(query1); while (rs1.next()) {...
2
by: marko.suonpera | last post by:
I'm using the Newmat library where element access in ColumnVector type is defined as follows: typedef double Real; Real& ColumnVector::operator()(int m) { REPORT if (m<=0 || mnrows)...
0
by: Systemino | last post by:
Hallo, I have a site developed on ASP.NET 2.0. It stay on my notebook and it works with a ORACLE database (ver. 9.0). It's all right!! Then I reached my definite site version on IIS 6.0 in...
7
by: jaegertw2 | last post by:
Hi guys, I've seen a few other similar posts, but i still cant figure out exactly what I'm doing wrong or what i need to do to fix it. I'm trying to find the ID number of the last record in a...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.