Hello, I am looking for some guidance on a piece code that I have inherited and am trying to use in a fresh application please. In short I have an existing form that has a calendar control that becomes visible on a button click next to a date field control, default date is today but that is then changed to that selected on the calendar control. On exiting the cal control becomes not visible. Here is the code:
Private Sub tglSearchDate_Click()
CalSearchDate.Visible = tglSearchDate
If IsNull(SearchApptDate) Then SearchApptDate = Date
CalSearchDate.Value = SearchApptDate
If CalSearchDate.Visible = False Then
If Not IsNull(SearchApptDate) And IsNull(SearchSortOrder) Then SearchSortOrder = “Next Appointment”
End If
End Sub
where tglsearchdate is the button
calsearchdate is the calendar
seacrhappDate is the date field
When I try to use this on my application the ‘calsearchdate.visible’ does’nt recognise the method/object assigned, and to be honest neither do I becuase I only thought it could be true or false.
Thanks, Darren.