Disable Form Checkbox

D

Downie

I have form with 6 checkboxes that are linked to a table

I'd like to have the first checkbox enabled upon from entry and the
remaining 5 disabled.

Once the first check box is true or checked I'd like the 2nd check box
to now be enabled

....2nd check 3rd enabled
....3rd check 4th enabled....to the 6 checkbox.

My below code is not working. Can you help?

Private Sub update_schedule_selection_cb_BeforeUpdate(Cancel As
Integer)
If Me.create_schedules_cb = False Then
Me.update_globals_estimates_cb = disabled
End Sub
 
R

Ron2005

1) Have the default for boxes 2 thru 5 be disabled.
2) in the afterupdate of box 1
if me.checkbox1 = true then
me.checkbox2.enabled = true
endif

What do you want to happen if they UNCHECK box 2 after they have
already check box 4.?

You may want the test in box 1 to be
if me.checkbox1 = true then
me.checkbox2.enabled = true
else
me.checkbox2 = false
me.checkbox2.enabled = false
me.checkbox3 = false
me.checkbox3.enabled = false
me.checkbox4 = false
me.checkbox4.enabled = false
me.checkbox5 = false
me.checkbox5.enabled = false
me.checkbox6 = false
me.checkbox6.enabled = false
end if

And for checkbox2 it would be:

if me.checkbox2 = true then
me.checkbox3.enabled = true
else
me.checkbox3 = false
me.checkbox3.enabled = false
me.checkbox4 = false
me.checkbox4.enabled = false
me.checkbox5 = false
me.checkbox5.enabled = false
me.checkbox6 = false
me.checkbox6.enabled = false
end if

etc.
 

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