G
Guest
Hi,
For some reason this does not work. No matter what month it is, it executes
the first stMoYr. Am I missing something? Here is my code.
Dim stMoYr as String
If Month(txtOutageDate) = "10" Or Month(txtOutageDate) = "11" Or
Month(txtOutageDate) = "12" Then
stMoYr = CStr(Year(txt_OutageDate)) & Month(txt_OutageDate)
Else: stMoYr = CStr(Year(txt_OutageDate)) & "0" &
Month(txt_OutageDate)
End If
Thanks,
For some reason this does not work. No matter what month it is, it executes
the first stMoYr. Am I missing something? Here is my code.
Dim stMoYr as String
If Month(txtOutageDate) = "10" Or Month(txtOutageDate) = "11" Or
Month(txtOutageDate) = "12" Then
stMoYr = CStr(Year(txt_OutageDate)) & Month(txt_OutageDate)
Else: stMoYr = CStr(Year(txt_OutageDate)) & "0" &
Month(txt_OutageDate)
End If
Thanks,