473,411 Members | 2,085 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,411 software developers and data experts.

Field index syntax

I have a table with fields named Part1, Part2, Part3 etc.

I get the following error message when I try to load the table via code.

Error = "Item not found in this collection"

I figure the error is in how I'm trying to index thru the fields using !Part(X)

What is the proper syntax?
For X = 1 To 8
.AddNew
!Part(X) = varRecords_Old_Data(1, X)
.Update
Next X

TIA, Rick
Nov 12 '05 #1
3 2654
Try
.Fields("Part" & X)

But I suspect you'll be happier if you normalize your data structure.

HTH
- Turtle

"Rick Brown" <rb*******@compuserve.com> wrote in message
news:82**************************@posting.google.c om...
I have a table with fields named Part1, Part2, Part3 etc.

I get the following error message when I try to load the table via code.

Error = "Item not found in this collection"

I figure the error is in how I'm trying to index thru the fields using !Part(X)
What is the proper syntax?
For X = 1 To 8
.AddNew
!Part(X) = varRecords_Old_Data(1, X)
.Update
Next X

TIA, Rick

Nov 12 '05 #2
That was the answer I was looking for, Mr. T.

If you saw the way I use data then you'd understand why its not normalized.
And then I'm still not totally sure what normalize means.

I do know I appreciate having Guru Turtles ready and waiting.

Thanks, Rick

"MacDermott" <ma********@nospam.com> wrote in message news:<F9******************@newsread2.news.atl.eart hlink.net>...
Try
.Fields("Part" & X)

But I suspect you'll be happier if you normalize your data structure.

HTH
- Turtle

"Rick Brown" <rb*******@compuserve.com> wrote in message
news:82**************************@posting.google.c om...
I have a table with fields named Part1, Part2, Part3 etc.

I get the following error message when I try to load the table via code.

Error = "Item not found in this collection"

I figure the error is in how I'm trying to index thru the fields using

!Part(X)

What is the proper syntax?
For X = 1 To 8
.AddNew
!Part(X) = varRecords_Old_Data(1, X)
.Update
Next X

TIA, Rick

Nov 12 '05 #3
TC

"Rick Brown" <rb*******@compuserve.com> wrote in message
news:82**************************@posting.google.c om...

(snip)
If you saw the way I use data then you'd understand why its not normalized. And then I'm still not totally sure what normalize means.

There's a reasonable article at:
http://support.microsoft.com/support...es/Q100139.ASP

HTH,
TC

Nov 12 '05 #4

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

Similar topics

20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
25
by: Rick Collard | last post by:
Using DAO 3.6 on an Access 2002 database, I'm getting unexpected results with the FindFirst method. Here's the simple code to test: Public Sub FindIt() Dim db As Database, rs As Recordset...
2
by: John Kotuby | last post by:
Hi all, Maybe this belongs in the Full Text group but I am writing an ASP.NET application with a SQL Server 2005 backend, so I am posing the question here. I have been using fulltext search...
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.