refer to the actual field name

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

Guest

I have aform with a sub form.


When I double click any item in the sub form, i need to insert the contents
of this field into a field on the main form,

The name of the field to which the data is to be placed, is in fact,
contained as the value of another field in the main form (it is dynamic)...

How do i get access to refer to the field name via the contents of the field
that has the name of the field as the contents??
 
Forms!NameOfForm.Controls("NameOfControl")

You'd replace NameOfForm with the actual form name. "NameOfControl" can
either be a literal string (as above), or a variable or a reference to
another field:

Forms!NameOfForm.Controls(strControl)

Forms!NameOfForm.Controls(Forms!NameOfOtherForm!NameOfOtherControl)
 

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

Back
Top