Using variable in field name

  • Thread starter Thread starter H. Martins
  • Start date Start date
H

H. Martins

Hi.

I have a table whose fields are named boolType00, boolType01,
boolType02, ..., boolType19.

I need to make a loop and real all of the 20 fields. Something like:

Dim i1 As Integer
i1=0
While i1 < 20
Debug.Print MyTable!boolType"i1"
i1=i1+1
Wend

Is there a way to do it?

Thanks
H. Martins
 
Ok, thanks.

That seem to work for fields but not for CheckBoxes.

I need to loop also by CkeckBoxes placed in a form.

I need to dynamicaly open some database and fulfill some form
checkboxes.

Checkboxes are named as chkbx00, chkbx01, ... , chkbx19.

The table is used to store some sort of previous configuration (nor
related to the data itself).

At form close inverse procedure will take place.

Thanks again,
H. Martins
 
Back
Top