automatic naming of controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i need to create on a form with MANY checkbox controls. they're to be laid
out in a crosstab layout. i need to have the controls named in a specific
sequence, eg. col1_row1, col1_row2, etc...col2_row1, col2_row2, etc... is
there a way to create/copy/paste controls and have them named according to a
specific sequence? can this be done through vba? i'm sure it is possible
with vba, just not quite sure how to do it. THANKS!!!
 
Hi,



I don't know any documented way, short of creating the controls in a
loop with CreateControl method (the form must be opened, in design mode).

Alternatively, not documented and thus, not supported... so if its
format your hard disk, don't blame anyone, there are

Application.SaveAsText acForm, "FormName", pathAndFileName.txt"

and

Application.LoadFromText acForm, "FormNameToCreate",
"pathAndFileName.txt"


that can transform your form in a text file, which you can explore and
manipulate (and try adding control while in text ). I stress the point,
those methods are not supported, so, don't blame anyone if they don't or
stop doing what you though they were doing... or if they don't work at all
on some versions, past, present, or futur, or on some PC but not on other,
etc.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top