Access Form - Lock Fields from Editing

Joined
Apr 18, 2014
Messages
1
Reaction score
0
I am trying to create a "Master Form" where the end-user selects a technicians name from combo box based on a query. The Combo Box has an On Change procedure that updates 6 additional (text) fields on the form re: tech number and location. That process seems to work just fine.

Where I am getting tripped up is - if the data entry person goes back to an existing record and selects a different technician in combo box the information is updated with the new technician data - which would then be incorrect.

I have been able to lock the text fields:

Private Sub txtTechnicianName_Exit(Cancel As Integer)
If IsNull(Me.txtTechnicianName) Then
Me.txtTechnicianName.Locked = False
Else
Me.txtTechnicianName.Locked = True
End If

And tabbing into the field - I cannot change the data but if I go back to the combo box and select a different technician - the 6 text fields are updated with the new technician's information.

What I am trying to accomplish is locking the 6 text fields once saved.

Any insights on where I am going wrong would be greatly appreciated - Su
 
Back
Top