The following routine resets 36 Text Boxes in array:
For i = 1 to 36
Controls("ID" & i).Value = ""
Next i
It works fine.
--------------------
With the following code I get a Run-Time Error 2465
that it can't find the Field ID1
For i = 1 to 36
Controls("Forms!frmBookList!fsubSubjectsBook.Form!ID" & i).Value = ""
Next i
---------------------
I've tried to reset this value without using Controls and it does work ok.
Forms!frmBookList!fsubSubjectsBook.Form!ID1 = ""
It seems to be as with the Controls syntax it dosn't work.
-------------------------------------------------------
Later in the program I fill up the boxes with values from the database so I
cannot do it one by one 36 times.
Any Idea how to get over this problem ?
Thanks
For i = 1 to 36
Controls("ID" & i).Value = ""
Next i
It works fine.
--------------------
With the following code I get a Run-Time Error 2465
that it can't find the Field ID1
For i = 1 to 36
Controls("Forms!frmBookList!fsubSubjectsBook.Form!ID" & i).Value = ""
Next i
---------------------
I've tried to reset this value without using Controls and it does work ok.
Forms!frmBookList!fsubSubjectsBook.Form!ID1 = ""
It seems to be as with the Controls syntax it dosn't work.
-------------------------------------------------------
Later in the program I fill up the boxes with values from the database so I
cannot do it one by one 36 times.
Any Idea how to get over this problem ?
Thanks