L
Lloyd Couture
It seems so I should be able to use a Do Loop or Do while for this code but
I can't seem to grasp how to implement it.
I have a form with 32 text boxes, each box has two check boxes and one text
box. I have to put the following code in the after update of the check boxes
and in the oncurrent of the form.
For MeCompleted
Private Sub Form_Current()
If Me!IsCompleted = True Then
DateToDue.ControlSource = "CompletionDate"
Label19.Caption = "Completion Date"
ElseIf Me!Follow1 = True Then
DateToDue.ControlSource = "FollowUpDate"
Label19.Caption = "Date To Due"
Else
Label19.Caption = "Date to Due"
DateToDue.ControlSource = DateToDue.DefaultValue
End If
For MeCompleted 2
If Me!IsCompleted2 = True Then
DateToDue2.ControlSource = "CompletionDate2"
Label37.Caption = "Completion Date"
ElseIf Me!Follow2 = True Then
DateToDue2.ControlSource = "FollowUpDate2"
Label37.Caption = "Date To Due"
Else
Label37.Caption = "Date to Due"
DateToDue2.ControlSource = DateToDue2.DefaultValue
End If
The code is the same for all 32 controls, the only change is the control
names which are numbered sequentially.
Any suggestions would be appreciated.
I can't seem to grasp how to implement it.
I have a form with 32 text boxes, each box has two check boxes and one text
box. I have to put the following code in the after update of the check boxes
and in the oncurrent of the form.
For MeCompleted
Private Sub Form_Current()
If Me!IsCompleted = True Then
DateToDue.ControlSource = "CompletionDate"
Label19.Caption = "Completion Date"
ElseIf Me!Follow1 = True Then
DateToDue.ControlSource = "FollowUpDate"
Label19.Caption = "Date To Due"
Else
Label19.Caption = "Date to Due"
DateToDue.ControlSource = DateToDue.DefaultValue
End If
For MeCompleted 2
If Me!IsCompleted2 = True Then
DateToDue2.ControlSource = "CompletionDate2"
Label37.Caption = "Completion Date"
ElseIf Me!Follow2 = True Then
DateToDue2.ControlSource = "FollowUpDate2"
Label37.Caption = "Date To Due"
Else
Label37.Caption = "Date to Due"
DateToDue2.ControlSource = DateToDue2.DefaultValue
End If
The code is the same for all 32 controls, the only change is the control
names which are numbered sequentially.
Any suggestions would be appreciated.