R
richard
Have been looking at another post and am struggling to get the calendar to
put the date selected into the field after I have clicked the date.
Below is the code I am using, all that is returned to the field is todays date
Private Sub Date_Sample_Taken_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Calendar5.Visible = True
Calendar5.SetFocus
If Not IsNull(Date_Sample_Taken) Then
Calendar5.Value = Date_Sample_Taken.Value
Else
Calendar5.Value = Date
End If
End Sub
Then when the calendar appears I select the appropriate date and the
following code is then run
Private Sub Calendar5_Click()
Calendar5.Value = Date
Date_Sample_Taken.SetFocus
Calendar5.Visible = False
End Sub
the Calendar closes but the date selected does not appear in the form field,
just the current date.
Thanks
Richard
put the date selected into the field after I have clicked the date.
Below is the code I am using, all that is returned to the field is todays date
Private Sub Date_Sample_Taken_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Calendar5.Visible = True
Calendar5.SetFocus
If Not IsNull(Date_Sample_Taken) Then
Calendar5.Value = Date_Sample_Taken.Value
Else
Calendar5.Value = Date
End If
End Sub
Then when the calendar appears I select the appropriate date and the
following code is then run
Private Sub Calendar5_Click()
Calendar5.Value = Date
Date_Sample_Taken.SetFocus
Calendar5.Visible = False
End Sub
the Calendar closes but the date selected does not appear in the form field,
just the current date.
Thanks
Richard