Hello,
Not sure why this is not functioning correctly.
I have a check box, LblScheduled_Click(), when I click it (True) then it checks 2 conditions before moving on to the next piece of code.
The first one works no problem, the second one elseif, is not producing the txtmessage, not highlighting red etc. but it does set the focus.
Thoughts? Part Code below.
Not sure why this is not functioning correctly.
I have a check box, LblScheduled_Click(), when I click it (True) then it checks 2 conditions before moving on to the next piece of code.
The first one works no problem, the second one elseif, is not producing the txtmessage, not highlighting red etc. but it does set the focus.
Thoughts? Part Code below.
Code:
Private Sub LblScheduled_Click()
Dim txtmessage As String
txtmessage = ""
If Len(Nz(Me.TxtCustomerPreferredDate)) = 0 Then ' Check for Delivery Date
txtmessage = MsgBox("Please enter Delivery Date." & vbCrLf & txtmessage)
Me.TxtCustomerPreferredDate.BackColor = vbRed
Me.TxtCustomerPreferredDate.ForeColor = vbWhite
Me.TxtCustomerPreferredDate.SetFocus
ElseIf IsNull(Nz(TxtSchedMins)) = 0 Then ' Check Minintes entered
txtmessage = "Enter Total of SetOut and Scheduling minutes." & vbCrLf & txtmessage
Me.TxtSchedMins.BackColor = vbRed
Me.TxtSchedMins.BackColor = vbWhite
Me.TxtSchedMins.SetFocus
Else
Me.TxtCustomerPreferredDate.BackColor = vbWhite
Me.TxtCustomerPreferredDate.ForeColor = vbBlack
Me.TxtSchedMins.BackColor = vbWhite
Me.TxtSchedMins.BackColor = vbBlack
If ChkSetOut_Complete Then
If ChkScheduled = True Then