C
Chad
Hello, Im using a function in my switchboard with two text boxes that
requires me to select dates. Its working fine but I want to have another
section with a differnt area on the same switchboard that will allow me to
choose only one date from a seperate text box. How would I fix the code below
so that it only requires me to have a date in a text box named
txtSupervisors? Thanks!
Private Function ValidDates() As Boolean
Dim strMsg As String
ValidDates = True
If IsDate(Me.txtStartDate) And IsDate(Me.txtEndDate) Then
If Me.txtStartDate > Me.txtEndDate Then
strMsg = "Start Date must be EQUAL TO or LESS THAN End Date."
End If
Else
strMsg = "Both Start and End Dates are Required for the Reports."
End If
If Len(strMsg) Then
MsgBox strMsg, vbOKOnly, "Date Entry Error"
ValidDates = False
End If
End Function
requires me to select dates. Its working fine but I want to have another
section with a differnt area on the same switchboard that will allow me to
choose only one date from a seperate text box. How would I fix the code below
so that it only requires me to have a date in a text box named
txtSupervisors? Thanks!
Private Function ValidDates() As Boolean
Dim strMsg As String
ValidDates = True
If IsDate(Me.txtStartDate) And IsDate(Me.txtEndDate) Then
If Me.txtStartDate > Me.txtEndDate Then
strMsg = "Start Date must be EQUAL TO or LESS THAN End Date."
End If
Else
strMsg = "Both Start and End Dates are Required for the Reports."
End If
If Len(strMsg) Then
MsgBox strMsg, vbOKOnly, "Date Entry Error"
ValidDates = False
End If
End Function