alter the name of a control or field

  • Thread starter Thread starter Frank Dulk
  • Start date Start date
F

Frank Dulk

Is it possible to alter the name of a control or field inside of a
procedure?
I need to accomplish a consultation and to fill out a temporary table with
the obtained results, they put, separate for columns (mes1, mes2,... mes6).
As in the example below:
i = 1
n = 6
For i = 1 To n
....
.....
......
Do Until Rsh.EOF
Tbl.AddNew
Tbl!Numero = Rsh!Numero
Tbl!TIPO = Rsh!TIPO
Tbl!Depart = Rsh!Depart
Tbl!Labor = Rsh!labor
-->Tbl![Mes + i] = Rsh!Data
Tbl.Update

Rsh.MoveNext
Loop
i = i + 1
Next

Or be....
Would I like to alter the name of the field of the table [month?], using the
own increment of the loop, once my variable " N " can have a value of 3 up
to 12 months.
 
If I am understanding correctly....you are looking for something like

Tbl.Fields("Mes" & i) = Rsh!Data
 
Back
Top