473,385 Members | 1,409 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.

Error 3265 - Again!

2
Hi,

I looked up all I could read up on the error, and still can't make heads or tails of what I am doing wrong.

My goal is to be able to update a series of fields for a specific record using a loop. As such my field name must be a variable.

I have shortened the code to the particular area where the error arises. I have declared all my variables, and field names referenced by the variable match those in the table.


Expand|Select|Wrap|Line Numbers
  1. Dim fld As DAO.field
  2. Set fld = updatetable(0)
  3.  
  4.                 x = 0
  5.                 For x = 0 To length
  6.                     If e(x) > 0 Then
  7.                         xstr = CStr(x)
  8.                         .Edit
  9.                         strfldnm = "Error" & xstr
  10.                         fld = strfldnm
  11.                         ![fld(0)] = True
  12.                         .Update
  13.                     End If
  14.                 Next x
If anyone could help, it would be greatly apprecaited. If you need all the code, I'll gladly post it.

Thanks
Oct 25 '07 #1
1 1859
thejad
2
Found the answers in the tutorials - i needed to call it as:

updatetable(fld) = True

rather than

![fld(0)] = True

I can't say that I totally understand, but it works!

Thanks

Hi,

I looked up all I could read up on the error, and still can't make heads or tails of what I am doing wrong.

My goal is to be able to update a series of fields for a specific record using a loop. As such my field name must be a variable.

I have shortened the code to the particular area where the error arises. I have declared all my variables, and field names referenced by the variable match those in the table.


Expand|Select|Wrap|Line Numbers
  1. Dim fld As DAO.field
  2. Set fld = updatetable(0)
  3.  
  4.                 x = 0
  5.                 For x = 0 To length
  6.                     If e(x) > 0 Then
  7.                         xstr = CStr(x)
  8.                         .Edit
  9.                         strfldnm = "Error" & xstr
  10.                         fld = strfldnm
  11.                         ![fld(0)] = True
  12.                         .Update
  13.                     End If
  14.                 Next x
If anyone could help, it would be greatly apprecaited. If you need all the code, I'll gladly post it.

Thanks
Oct 25 '07 #2

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

Similar topics

2
by: Lee Stafford via AccessMonster.com | last post by:
I get this error message when I type in a new value. The code behind this combo box is: Private Sub City_NotInList(NewData As String, Response As Integer) Response = Append2Table(Me!,...
1
by: Sivasenthil | last post by:
With the Runtime error above , I get the following message" Item cannot be found in the collection corresponding to the requested name or ordinal" Is this application specific or a common VB...
0
by: rajkalacbe | last post by:
I am running a visual basic executable program through Forms4.5 of D2K using Forms menu options.. When I Invoke this form in the server where I have the database installed, I do not have any...
6
by: darkhat01 | last post by:
I am getting a Run-Time error '3265': Item cannot be found in the collection corresponding to the requested name or ordinal. The Function call I am using is: ...
1
by: wassimdaccache | last post by:
Hello Please help me I working on database using access 2003 I'm writing into a save bottom on a form this code to insert some of my value on another table ...no relationship between them ...
2
by: marcohod | last post by:
Hi, I'm using ADO 2.8 in VB6 to use an SQL Server 2000 database. This works: Dim MyRS2 As New ADODB.Recordset MySQL = "Select * from table1" MyRS2.Open MySQL, sqlConnection,...
3
by: DGNinja12 | last post by:
I get this error when i run, i cant figure out what is wrong Can some one please help me? Run-time error '3265': Item cannot be found in the collection corresponding to the requested name or...
0
nurikoAnna
by: nurikoAnna | last post by:
Dim rsFaculty As New ADODB.Recordset Dim rsDepartment As New ADODB.Recordset Dim oCm As New ADODB.Command Private Sub Disconnect() connect.Close End Sub
8
by: charli | last post by:
Error 3265, "Item cannot be found in the collection corresponding to the requested name or ordinal" code programatically opens a query using ADOX and changed the sql Dim cat As New...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.