I have a form to calculate cycle time based on 26 different possibilities, which are events in a sequence. I need to start with the first event that does not have a date entered and calculate estimated date of occurrence from there. The entries that do have events entered need to have a simple calculation done to them.
Instead of making a huge array of If..Then statements, I would prefer a much more simplistic code structure. I am not exactly sure where to begin. Rather than stating something like:
If IsNull(date1) then
box1 = box0 + 1
box2 = box0 + 6
box3 = box0 + 8
Else If IsNull(Date2) Then
box2 = box1 + 6
box3 = box1 + 8
box4 = box1 + 3....And so on, 26 times for 26 boxes, and with other variables that make me have to repeat this procedure eight times.
Any suggestions, examples of similarly performed items, or even naming a function or two that might point me in a direction are very helpful. Thank you in advance.
Instead of making a huge array of If..Then statements, I would prefer a much more simplistic code structure. I am not exactly sure where to begin. Rather than stating something like:
If IsNull(date1) then
box1 = box0 + 1
box2 = box0 + 6
box3 = box0 + 8
Else If IsNull(Date2) Then
box2 = box1 + 6
box3 = box1 + 8
box4 = box1 + 3....And so on, 26 times for 26 boxes, and with other variables that make me have to repeat this procedure eight times.
Any suggestions, examples of similarly performed items, or even naming a function or two that might point me in a direction are very helpful. Thank you in advance.