Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking / unlocking form

Status
Not open for further replies.

Urnen

Technical User
Oct 16, 2003
8
0
0
NL
First of all I'm not an expert. but here's my problem

i made a form wich is working perfect. i locked down everything in this form. the thing is that the client does have to be able to change the data ( but in another form ) or after pressing a sertain button..

how can i unlock this form so all the locked data becomes editable.

thx

Urn!
 
Something like?
Code:
Private Sub cmd_Unlock_Click()
Dim ctrl As Control

For Each ctrl In Me.Controls
    If TypeOf ctrl Is TextBox Then
        ctrl.Locked = False
    End If
Next

End Sub
That code will loop through all of the controls on your form and if it is a textbox it will set the locked property to False. Is this the sort of thing you are after??

Hope this helps

Harleyquinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top