473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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

1 827
ADezii
8,834 Expert 8TB
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

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

Similar topics

2
by: Bruce Lester | last post by:
Is there a way to create a trigger directly on an inline or multi-line table value function? I am trying to create a quick-and-dirty application using an Access Data Project front-end with SQL...
2
by: C | last post by:
If I want to declare a function in a header file that returns a string, I always get an error (something complaining about a syntax error before an ')'). I have declared: #ifndef...
8
by: Roman Mashak | last post by:
Hello, All! I started to implement simple command line interface (CLI), and wanna know how to use table of fucntion calls. Could you please, recommend me some link or give example directly in...
2
by: Sammut | last post by:
Hi, I have the following function to which I need to pass a string variable private string cMask (string sText) { } but ever time I try to compile I get the error
3
by: Sammut | last post by:
Hi, I have the following function to which I need to pass a string variable private string cMask (string sText) { } but ever time I try to compile I get the error
0
by: Susanne | last post by:
Hi I get a message saying: "The table contains 6144 items and is full. No more items can be added" when trying to add a new string to a string table in the VC resource editor. My resource file...
4
by: benjitah | last post by:
Hi, I have a string table which i'm wanting to export into something easy to use (like excel) for a translator, and then re-import back into the same string table format. Does anyone know how...
24
by: Derek Hart | last post by:
Is there an efficient line of code to count the number of instances of one string within another. If I have the sentence: "I want to go to the park, and then go home." It would give me a...
5
by: Bogdan | last post by:
As a mainly C/C++ and Java developer I was quite surprised when I realized that C# compiler takes both "string" and "String" types. C# is case sensitive so I'm a bit puzzled by that. Could...
1
by: Slippy27 | last post by:
How do I test a byte string in Python? I want to manually convert (no libraries or functions) a UTF-8 string into UTF-16. My basic solution is to read from the stream some number of UTF-8 bytes,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.