Hi Peeps,
I'm trying to lock certain fields on my form based on the value in a particular field. It seems to work the first time but applies itself to all other records in the database from then on!
The starting point is a command button that sends an email and makes Me.DPLLock = 1. The corresponding table entry is formatted as a number.
The code I'm pulling my hair out over is...
Private Sub Form_Current()
If Me.DPLLock = 1 Then
Me.OR_Name.Locked = True
Me.OR_Sales_Order.Locked = True
Me.OR_WO_No.Locked = True
Me.OR_Qty.Locked = True
Me.OR_Dept.Locked = True
Me.OR_Project.Locked = True
Me.OR_Part_No.Locked = True
Me.OR_Part_Iss.Locked = True
Me.OR_Drg_Iss.Locked = True
Me.OR_Query.Locked = True
End If
Ive tried Me!DPLLock with the same result. :banghead:
Forgive the underscores in the field names, I did them when I was an even smaller puppy!
Any pointers?
I'm trying to lock certain fields on my form based on the value in a particular field. It seems to work the first time but applies itself to all other records in the database from then on!
The starting point is a command button that sends an email and makes Me.DPLLock = 1. The corresponding table entry is formatted as a number.
The code I'm pulling my hair out over is...
Private Sub Form_Current()
If Me.DPLLock = 1 Then
Me.OR_Name.Locked = True
Me.OR_Sales_Order.Locked = True
Me.OR_WO_No.Locked = True
Me.OR_Qty.Locked = True
Me.OR_Dept.Locked = True
Me.OR_Project.Locked = True
Me.OR_Part_No.Locked = True
Me.OR_Part_Iss.Locked = True
Me.OR_Drg_Iss.Locked = True
Me.OR_Query.Locked = True
End If
Ive tried Me!DPLLock with the same result. :banghead:
Forgive the underscores in the field names, I did them when I was an even smaller puppy!
Any pointers?