I
Ian Millward
I have a form with a ListBox which shows a couple of fields from a table.
When the user scrolls down the list and stops at a record, the remaining
fields of the table are shown in several unbound TextBoxes. I do this by
connecting them to an ADO RecordSet at run time, coded in the ListBox's
AfterUpdate event. This works fine except for DateTime fields. I cannot get
them to work properly. I have tried putting # around the field name and
putting it in Str, CStr, DateValue and a host of other functions and I have
formatted the TextBox's Format property to ShortDate , all to no avail.
This is accomplished simply and elegantly in Delphi with the DateToStr
function. Is there something similar I am missing in this benighted
Development Environment.
Can someone give me a steer in the right direction.
Ian Millward
Edinburgh
When the user scrolls down the list and stops at a record, the remaining
fields of the table are shown in several unbound TextBoxes. I do this by
connecting them to an ADO RecordSet at run time, coded in the ListBox's
AfterUpdate event. This works fine except for DateTime fields. I cannot get
them to work properly. I have tried putting # around the field name and
putting it in Str, CStr, DateValue and a host of other functions and I have
formatted the TextBox's Format property to ShortDate , all to no avail.
This is accomplished simply and elegantly in Delphi with the DateToStr
function. Is there something similar I am missing in this benighted
Development Environment.
Can someone give me a steer in the right direction.
Ian Millward
Edinburgh