command button to unlock a field?

DeanRowe

Registered User.
Local time
Today, 17:56
Joined
Jan 26, 2007
Messages
142
Hi,

I have a form called “Quote Entry Form” which contains a subform called “Order Details”.

There is a field inside the “Order Details” subform called “Product Name” which has the “locked” property set to “Yes”.

Does anyone know if there is any code that I can set to a command button to unlock this field? I dont want a user to be able to edit the data inside "Product Name" unless the command button is pressed first.

Any help or advice would be greatly appreciated.

Thank you

Dean
 
Solved it!
In case anyone looks this up in future the code is:

Me.[Order Details].Form.[Product Name].Locked = False

which unlocks the field in the subform.
 
for your info - i do the same sort of thing - but with tick boxes - iftrue then its locked and you cannot edit it and if they untick then they can edit ..
same thing different approach ..

regards
 
And here's an alternate code (just because I felt like throwing it out there :D :

Me.Controls("Order Details").Form.Controls("Product Name").Locked = False
 

Users who are viewing this thread

Back
Top Bottom