Locking Record

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

Hello.
I have a continuous form that has a table as record
source. Each record has a Yes/No type field that checks if
some value has allready been processed or not. What i'm
trying to do is when the user clicks on an edit button on
the form he is not allowed to change the records that has
the Yes/No field with the value Yes.
Is this possible to do with continuous forms? If not, how
can i build a form to "simulate" this type of form
(continuous)?

Thanks in advance.

Luis
 
Try adding this to the Forms "On Current" Procedure.

Me.EditButton.Enabled = True ' Name of your edit button
Me.AllowEdits = True
If Me.YesNoField = 0 Then Exit Sub 'Looks At Required
Field to determine if edits are allowed
Me.EditButton.Enabled = False ' Name of your edit button
Me.AllowEdits = False

HTH

Tony C
 
Worked perfectly!!
Thank you very much Tony!

-----Original Message-----
Try adding this to the Forms "On Current" Procedure.

Me.EditButton.Enabled = True ' Name of your edit button
Me.AllowEdits = True
If Me.YesNoField = 0 Then Exit Sub 'Looks At Required
Field to determine if edits are allowed
Me.EditButton.Enabled = False ' Name of your edit button
Me.AllowEdits = False

HTH

Tony C
.
 
Back
Top