Writing to a field useing field index?

Lizzard

New member
Local time
Today, 06:04
Joined
Jun 18, 2001
Messages
6
I´m trying to write data to fields, without the need to specify the name of every field. I would like to be able to address each field with an index. I was thinking of something like this....
---------------------------------------------
With dbs_test
.AddNew
Do While .....
Field(int_index) = strdata
int_index = int_index + 1
Loop
.Update
.Close
End With
---------------------------------------------

Many thanks!!
/Lizzard
 
dim rst as recordset
set rst=...

With rst
.AddNew
Do While .....
.Field(int_index) = strdata
int_index = int_index + 1
Loop
.Update
.Close
End With

This should work for you. Of course I have to ask where you are assigning the value of strdata. Does it change?

But if you know what you're doing, your structure was mostly right, just need your dot in front of Field.
 

Users who are viewing this thread

Back
Top Bottom