Is it Possible to Unlock Parts of a Locked field on a form? (1 Viewer)

gold007eye

Registered User.
Local time
Today, 04:03
Joined
May 11, 2005
Messages
260
I'm trying to see if is it possible to only "lock/unlock" parts of a specific field on a form.

Example:

I have a field called CCN with the value of 99-11-001-777-888.

I have code that locks the field based on a users access level in the Security table. What I need to see is if it is possible to unlock only a portion of this field, while retaining the lock on the rest of the field.

Example: I would like certain users to be able to update the "99", "777", & "888" portions of the above example while retaining a lock/preventing changes of the "11" & "001" fields.

Is this even possible and if so, how would I tackle this?
 

JoanneJames

Registered User.
Local time
Today, 04:03
Joined
Feb 19, 2008
Messages
59
In before update event, you could try applying the original value against the new value with some kind of bit-wise operation that would retain the values in the other positions (of course assuming the pattern is always the same)
 

missinglinq

AWF VIP
Local time
Today, 04:03
Joined
Jun 20, 2003
Messages
6,423
Simplest way would be to not store the entire CCN in a single field. Break it up into 2 or more parts, depending on your exact needs, and manage the components as needed, locking-wise.

You can then use a single, unbound, locked Control on Forms, Reports, etc, to display the entire CCN, simply using concatenation of the components.

Linq ;0)>
 

Users who are viewing this thread

Top Bottom