By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

Dlokkup pulls a test string from a table can I use that string in a function to refer

P: 1
I use the dlookup to pull the text from a table I have used to keep track of all of the pictures Ititles I have throughout 22 other forms/tables. I am trying to make a universal function to define the picture for each record on all the forms to cut down on my code. When I get the returned text it is the appropriate field name on each form. The problem is that it is text and I can't figure out how to change it in VGA to refer to a field
Nov 8 '13 #1

✓ answered by ADezii

You can utilize the Controls Collection of the Form to access its Controls utilizing a String Value, as in:
Expand|Select|Wrap|Line Numbers
  1. Dim strFieldName As String
  2.  
  3. strFieldName = "Last Name"
  4.  
  5. MsgBox Me.Controls(strFieldName).Height

Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,634
You can utilize the Controls Collection of the Form to access its Controls utilizing a String Value, as in:
Expand|Select|Wrap|Line Numbers
  1. Dim strFieldName As String
  2.  
  3. strFieldName = "Last Name"
  4.  
  5. MsgBox Me.Controls(strFieldName).Height
Nov 8 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.