Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007
    Posts
    37

    Unanswered: Run-Time Error 2465 in Controls syntax

    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

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    have a go with
    forms!frmBookList!fsubSubjectsBook.controls("ID" & i) =

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    May 2007
    Posts
    37
    Thanks it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •