|
-
Nov 2nd, 1999, 06:18 PM
#1
Thread Starter
Hyperactive Member
I have a string with my text box name in it ie
dim mystring as string
mystring = "text1"
how to I change a proprrty using only the string
ie
mystring.text = "hello"
help please
[email protected]
------------------
Slan
-
Nov 2nd, 1999, 07:11 PM
#2
Junior Member
It might be done by referencing the Fields collection of the form. If you iterate through the Fields collection to find your target field by name you should have access to all of the properties of the object.
-
Nov 2nd, 1999, 07:29 PM
#3
Frenzied Member
I wanted to do something simular some time ago because i wanted to map database field names to controls
This works, but does it do waht you want
Dim mystring As Object
Dim MyObject As Control
For Each MyObject In Form1.Controls
If MyObject.Name = "Text1" Then
Set mystring = MyObject
Exit For
End If
Next
mystring.Text = "hello"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|