Locking Record

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
 
T

Tony C

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
 
L

Luis

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
.
 

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