Locked Records Msg

M

Manton

I use the following line to like records, preventing staff from altering the
record:

Private Sub Form_Current()

With Me
.AllowEdits = Not Me.Locked
.AllowDeletions = .AllowEdits
End With

End Sub
------
Question: I would like to have a dialogue box or a text box appear on the
form (where the user enters data) indicating to them that the record is
locked. Currently there is simply a tick box on the form to let the user
know its locked but I want to remove this tick box from the form and instead
have the message show up. The administrator will simply use the datasheet
table to access the tick box.
thanks for any help.
 
D

Dirk Goldgar

Manton said:
I use the following line to like records, preventing staff from
altering the record:

Private Sub Form_Current()

With Me
.AllowEdits = Not Me.Locked
.AllowDeletions = .AllowEdits
End With

End Sub
------
Question: I would like to have a dialogue box or a text box appear on
the form (where the user enters data) indicating to them that the
record is locked. Currently there is simply a tick box on the form to
let the user know its locked but I want to remove this tick box from
the form and instead have the message show up. The administrator
will simply use the datasheet table to access the tick box.
thanks for any help.

How about a calculated text box with the ControlSource:

=IIf([Locked], "This record is locked.", "")

? The text box itself could be locked and disabled, to keep users from
thinking it's anything but a message.
 

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

Top