|
-
Aug 17th, 2001, 06:46 AM
#1
Thread Starter
Hyperactive Member
Locked Properties
I ahve a program that say has 200 items on the form, they being textboxes. cboboxes etc.. I have set all them as follows: locked = false, as I don't want anyone to change the values in the boxes until an add button, or edit button is pressed.
In my cmdAdd procedure I have the following code:
txtOne.Locked = False
txtTwo.Locked = False
txtThree.Locked = False etc...
Is there a one line of code I can use , instead of writing all this code in. I know I can copy and paste.
I have seen Set_All_Locks somewhere, I don't know if is VB code proper or someone's own.
Thanks
-
Aug 17th, 2001, 06:59 AM
#2
Fanatic Member
Look at this thread. It shows the use of typeOf to select all textBoxes on a form. You could use that loop to set the locked property.
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
|