Make all fields disabled

G

Guest

I have made my form, and i am looking to have a check box or combo to the
side and once the box is checked or yes is selected then all fields should
become uneditable, upon creating a new entry in the form all fields for that
entry should become editable again until the box or yes is selected. Also
when you go back and view the entries using the form they should be
uneditable. What would be the proper coding for this. I have it now to
where once you hit new entry or next and try and come back it is uneditable,
however i want to change this. Thanks.
 
F

Franck

your solution is the after update of the form
when the form load it fill it up and after the fill come the after
update, when you click or change something the after update get
triggered after the update of course :p
all you need now is this code

==========================================================
Me.AllowEdits = True
and all other possible subform like this
Me.mysubformname.Form.AllowEdits = True

after

if me.mycontrol.value = vbcheck (or anything else if it's not a
checkbox)
Me.AllowEdits = false
and allow false all other possible subform like this
Me.mysubformname.Form.AllowEdits = false
end if
==========================================================
 
G

Guest

I tried that code in the after update on the form and it does not work. The
Checkbox is named completed and all fields should be disabled after checkbox
is checked. Also the checkbox on the form should be linked to a field in the
table correct?
 
F

Franck

you dont have to have it linked or filled by a field in the table.
even a button would do the job.
and i checked in one of my old project it's Form_current not
afterupdate
 

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