Chosen Few only

D

Dan @BCBS

I locked a cupple fields so people could not change the date once entered.
(Me.TR_DATE_TIMERCVD_HOI.Locked = Not Me.NewRecord)

I need to allow only a certain group (MANAGER) to be able to change the
value. How can I do that???

Is this close???
If glevel <> "MANAGER" Then
(allow the value to be changed)

Thanks
 
T

TonyT

Hi Dan,

Dan @BCBS said:
I locked a cupple fields so people could not change the date once entered.
(Me.TR_DATE_TIMERCVD_HOI.Locked = Not Me.NewRecord)

I need to allow only a certain group (MANAGER) to be able to change the
value. How can I do that???

Is this close???
If glevel <> "MANAGER" Then
(allow the value to be changed)

Surely the other way around?
If glevel <> "MANAGER" Then
(Me.TR_DATE_TIMERCVD_HOI.Locked = Not Me.NewRecord)
Else: Me.TR_DATE_TIMERCVD_HOI.Locked = False
End If
Unlocked if Manager locked otherwise

TonyT..
 
D

Dan @BCBS

Yes and No
It does lock the field, which is really what I asked about, but I need it
locked only after the initial date is entered (which anyone can do)..

I know I cannot say EDIT instead of New (Not Me.EDITRecord).
So, what can I do to lock it only after the first time a value is entered by
anyone????

Thanks
 
D

Dan @BCBS

Any idea on how to lok the Text Box only after the data was entered once by
anyone???

Is it possible??
 
T

TonyT

Hi again Dan,

The most common approach would probably to set a bolean variable, that
becomes true after the first change, and is then reset to false on a new
record being selected, or any other situations you want to trap;

If Not bmyVariable Then
Me.TR_DATE_TIMERCVD_HOI.Locked = False
ElseIf glevel <> "MANAGER" Then
Me.TR_DATE_TIMERCVD_HOI.Locked = False
Else: Me.TR_DATE_TIMERCVD_HOI.Locked = True
End If

TonyT..
 
D

Dan @BCBS

This does exactally what I needed Thanks.

TonyT said:
Hi again Dan,

The most common approach would probably to set a bolean variable, that
becomes true after the first change, and is then reset to false on a new
record being selected, or any other situations you want to trap;

If Not bmyVariable Then
Me.TR_DATE_TIMERCVD_HOI.Locked = False
ElseIf glevel <> "MANAGER" Then
Me.TR_DATE_TIMERCVD_HOI.Locked = False
Else: Me.TR_DATE_TIMERCVD_HOI.Locked = True
End If

TonyT..
 
Top