I actually have the following code. I want to use the Calendar Control Ver 11 to Input the Date if Date based Answer is Selected.
I have created Calendar1 on a FormCalendar with a Command buttton cmdEnterDate. I want this to Pop and Pass the Date to UserMenu txtInput textbox.
I have created Calendar1 on a FormCalendar with a Command buttton cmdEnterDate. I want this to Pop and Pass the Date to UserMenu txtInput textbox.
Code:
Private Sub cmdNext_Click()
If txtInput.Visible Then
Select Case m_Validation
Case "D": 'Date
If Not IsDate(m_Response) Then
MsgBox "Please enter a valid date !", vbCritical
txtInput.SetFocus
Exit Sub
Else
m_Response = Format(m_Response, "dd mm yyyy") 'changed in version 7.34. May need to add both date formats
End If
Case "P" 'Percentage
If Not IsNumeric(m_Response) Then
MsgBox "Please enter a valid % !", vbCritical
txtInput.SetFocus
Exit Sub
Else
m_Response = Format(m_Response, "0.00%")
End If
Case "N" 'Numeric - Currency - Term Lenght - Age etc
If Not IsNumeric(m_Response) Then
MsgBox "Please enter a valid Number !", vbCritical
txtInput.SetFocus
Exit Sub
Else
m_Response = CDbl(m_Response)
End If
Case "T": 'Free Flow Text
m_Response = DoSpellCheck(m_Response)
Case Else:
m_Response = m_Response
End Select
End If