Syntax for variable control name

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
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top