Change allow edits property in VBA

B

Bob

Hello All;

TIA for your help.

Is it possible to change the "Allow Edits" property of a
form to no by checking a yes/no field on the same form
while it is open using VBA.

For example, if I have a proposal form and a final
checkbox. I would like the form to not allow edits if the
final checkbox value is true. I don't mind if the change
does not happen until the form closes.

Thanks a lot.

Bob
 
M

Marshall Barton

Bob said:
Is it possible to change the "Allow Edits" property of a
form to no by checking a yes/no field on the same form
while it is open using VBA.

For example, if I have a proposal form and a final
checkbox. I would like the form to not allow edits if the
final checkbox value is true. I don't mind if the change
does not happen until the form closes.


Have you tried it? if you did, what went wrong?

Assuming the final check box is bound to a Yes/No field in
the record source table/query, use the check box's
AfterUpdate event (immediately locks record being edited)
and the form's Current event (existing records) to run the
code:

Me.AllowEdits = Not Me.finalcheckbox
 
B

Bob

Thanks I will try it.

Bob
-----Original Message-----



Have you tried it? if you did, what went wrong?

Assuming the final check box is bound to a Yes/No field in
the record source table/query, use the check box's
AfterUpdate event (immediately locks record being edited)
and the form's Current event (existing records) to run the
code:

Me.AllowEdits = Not Me.finalcheckbox
 

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