Syntax for variable control name

  • Thread starter Thread starter Jim Tinder
  • Start date Start date
J

Jim Tinder

I have a DB that I utilize a standard form to clone all of
the forms in the DB. Each form is assigned a number via a
field on the form. The cloned forms will have identical
event procedures except for one statement in one
procedure. The statement has to do with requerying a
subform (xxx_subform_01, where xxx is the parent form
number). The event procedure for requerying the subform
therefore would be something like:

xxx = [form_number]
[xxx_subform_01].requery

What is the required syntax for the second line of the
procedure; i.e. what is the left side of the formula where
xxx a variable?

Thanks
Jim Tinder
 
Try:
Dim strFormName as String
strFormName = [form_number] & "_subform_01"
Me(strFormName).Form.Requery

Not sure I understood the need for lots of nearly identical subforms, but
that's the syntax.
 
Back
Top