Hi everyone, this is my first question.
My VB6 form contains 2 ComboBox and they are filled using .Additem after the Data control is populated through a Dynamic SQL.
My Access2000 tabel (tblOpticsData) have Date field formated as Short Date for the Data Type Date/Time. The table also contains Time field formated as Short Time with Data Type Date/Time.
When I open the table in the Access the column contains ONLY dates (format is mm/dd/yyyy) but my Combobox got fill with dates and time (mm/dd/yyyy hh:mm:ss AM/PM)!
What is going on? The following is the code;
Data3SQL = "SELECT tblOpticsData.Date " & _
"FROM tblOpticsData " & _
"WHERE LensCut = '" & _
List1 & "' ORDER BY tblOpticsData.Date"
Data3.RecordSource = Data3SQL
Data3.Refresh
Data3.Recordset.MoveFirst
While Not Data3.Recordset.EOF
With Data3.Recordset
cboStartDate.AddItem ![Date]
cboEndDate.AddItem ![Date]
.MoveNext
End With
Wend
My VB6 form contains 2 ComboBox and they are filled using .Additem after the Data control is populated through a Dynamic SQL.
My Access2000 tabel (tblOpticsData) have Date field formated as Short Date for the Data Type Date/Time. The table also contains Time field formated as Short Time with Data Type Date/Time.
When I open the table in the Access the column contains ONLY dates (format is mm/dd/yyyy) but my Combobox got fill with dates and time (mm/dd/yyyy hh:mm:ss AM/PM)!
What is going on? The following is the code;
Data3SQL = "SELECT tblOpticsData.Date " & _
"FROM tblOpticsData " & _
"WHERE LensCut = '" & _
List1 & "' ORDER BY tblOpticsData.Date"
Data3.RecordSource = Data3SQL
Data3.Refresh
Data3.Recordset.MoveFirst
While Not Data3.Recordset.EOF
With Data3.Recordset
cboStartDate.AddItem ![Date]
cboEndDate.AddItem ![Date]
.MoveNext
End With
Wend