JacobTechy
Programmer
I am developing a form using ms access 2002 and vb for apps where production workers enter in work orders. Once workers enter the work order the controls (textbox, combobox) become locked so that they wont edit the data. I do have a button called managers edit where the manager can input a password to allow him to edit the past entered records. My problem is that when the worker wants to add a new record those controls are locked also. How can I make it where the new records that will be entered do not have locked controls. Below is my code to lock the controls.
Code:
Private Sub Form_Open(Cancel As Integer)
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Locked = True
End If
If TypeOf ctl Is ComboBox Then
ctl.Locked = True
End If
Next
End Sub