Chosen Few only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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..
 
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
 
Any idea on how to lok the Text Box only after the data was entered once by
anyone???

Is it possible??
 
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..
 
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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top