Results 1 to 2 of 2

Thread: Locked Properties

  1. #1

    Thread Starter
    Hyperactive Member tomjess's Avatar
    Join Date
    Mar 2001
    Location
    Hamilton, New Zealand
    Posts
    348

    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

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    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
  •  



Click Here to Expand Forum to Full Width