Bit of a tricky one here, sort of know what I've got to do but keep thinking that there must be an easier way....
I have several check boxes on a form which represent 'stages' of work to be carried out, along with start and end dates for each stage. What I'm trying to achieve is that the stages have to be completed in order. (i.e. Stage 4 cannot be checked until stages 1,2 and 3 have been checked)
I've thought about using the following code on each checkbox but by the time I get to stage 8, the code will be massive....
if me.chkStage1 = True then
me.chkStage2.Enabled = True
me.dtStg2StartDate.Enabled = True
me.dtStg2EndDate.Enabled = True
end if
if me.chkStage2=true then
me.chkStage3.Enabled=true
me.dtStg3StartDate.Enabled = True
me.dtStg3EndDate.Enabled = True
end if
.... and so on
But I guess I'll need to add similar code to the 'after update' of each check box and also the form load event as well.
Does anyone know an easier way?
Many thanks
I have several check boxes on a form which represent 'stages' of work to be carried out, along with start and end dates for each stage. What I'm trying to achieve is that the stages have to be completed in order. (i.e. Stage 4 cannot be checked until stages 1,2 and 3 have been checked)
I've thought about using the following code on each checkbox but by the time I get to stage 8, the code will be massive....
if me.chkStage1 = True then
me.chkStage2.Enabled = True
me.dtStg2StartDate.Enabled = True
me.dtStg2EndDate.Enabled = True
end if
if me.chkStage2=true then
me.chkStage3.Enabled=true
me.dtStg3StartDate.Enabled = True
me.dtStg3EndDate.Enabled = True
end if
.... and so on
But I guess I'll need to add similar code to the 'after update' of each check box and also the form load event as well.
Does anyone know an easier way?
Many thanks