M
MAC
I don't think I fully understand what it is you are trying
to do.
However, with regard to your first question.
I would use a variable to contain the Field Name as
follows:
Dim stFieldName as string
....
For I=1 to 5
stFieldName="ID_"& I
....
Next
Perhaps, you could use this variable in a parameter query.
MAC
to do.
However, with regard to your first question.
I would use a variable to contain the Field Name as
follows:
Dim stFieldName as string
....
For I=1 to 5
stFieldName="ID_"& I
....
Next
Perhaps, you could use this variable in a parameter query.
MAC
inside a query the value of the i in the loop?-----Original Message-----
In a loop how can you refer to a field that have a number at the end:
ID_1, ID_2 up to 5?
For i=1 to 5
* run a query that is base on each field query_1, query_2 etc...
next
And for futur reference, is it possible to reference
try to add it to the name of the field.so would end up like:
stDocName = "Kit_UPD"
for i =1 to 5
DoCmd.OpenQuery stDocName, acNormal, acEdit
** in the query the value of i is used to reference the field
Next
I'm getting errors on getting the value of the "i" when I