I have a Visual Basic 6 (Enterprise edition)application that creates a Microsoft Access Database table. The table is partially designed as follows:
TableName: InventoryHistory
Fields:
dbPartNumber text (30)
dbHistoryInfo text (50)
dbEnterDate text (10)
dbEnterTime text (6)
The application creates the records in the table by using the SQL "Insert" statement as follows:
sql = "Insert into InvetoryHistory (dbPartNumber, dbHistoryInfo, dbEnterDate, dbEnterTime) values ("
sql = sql & "'" & InPartNumber & "', "
sql = sql & "'" & InHistoryInfo & "', "
sql = sql & "'" & format(Date,"MM/dd/yyyy") & "', "
sql = sql & "'" & format(Time,"hhmmss") & "'"
When the report is printed, the records in the "Detail Section" need to be printed in Time within DATE descending sequence.
I am having a problem sorting the records. Example:
PartNumber 5C parts pulled for C1 Circuit Board 09/12/2007 162412
PartNumber 22X parts pulled for C3 Circuit Board 09/12/2007 201309
PartNumber 2B parts pulled for C5 Circuit Board 11/08/2007 092054
PartNumber 5C parts pulled for C8 Circuit Board 01/03/2008 113443
PartNumber 6X parts pulled for C2 Circuit Board 01/03/2008 133034
PartNumber 6X parts pulled for C2 Circuit Board 01/02/2008 094231
The DETAIL SECTION output needs to look like this:
01/03/2008 133034 6X parts pulled for C2 Circuit Board
01/03/2008 113443 5C parts pulled for C8 Circuit Board
01/02/2008 094231 6X parts pulled for C2 Circuit Board
11/08/2007 092054 2B parts pulled for C5 Circuit Board
09/12/2007 201309 22X parts pulled for C3 Circuit Board
09/12/2007 162412 5C parts pulled for C1 Circuit Board
Can you help on how I can sort the records in the proper order? One way I can do this is to sort the records in DESCENDING Sequence by YEAR/MONTH/DAY then TIME (Descending). If I use the Record Sort Expert, The Record Sort Expert defines the whole field. The field is defined in the format Month/Day/Year.
TableName: InventoryHistory
Fields:
dbPartNumber text (30)
dbHistoryInfo text (50)
dbEnterDate text (10)
dbEnterTime text (6)
The application creates the records in the table by using the SQL "Insert" statement as follows:
sql = "Insert into InvetoryHistory (dbPartNumber, dbHistoryInfo, dbEnterDate, dbEnterTime) values ("
sql = sql & "'" & InPartNumber & "', "
sql = sql & "'" & InHistoryInfo & "', "
sql = sql & "'" & format(Date,"MM/dd/yyyy") & "', "
sql = sql & "'" & format(Time,"hhmmss") & "'"
When the report is printed, the records in the "Detail Section" need to be printed in Time within DATE descending sequence.
I am having a problem sorting the records. Example:
PartNumber 5C parts pulled for C1 Circuit Board 09/12/2007 162412
PartNumber 22X parts pulled for C3 Circuit Board 09/12/2007 201309
PartNumber 2B parts pulled for C5 Circuit Board 11/08/2007 092054
PartNumber 5C parts pulled for C8 Circuit Board 01/03/2008 113443
PartNumber 6X parts pulled for C2 Circuit Board 01/03/2008 133034
PartNumber 6X parts pulled for C2 Circuit Board 01/02/2008 094231
The DETAIL SECTION output needs to look like this:
01/03/2008 133034 6X parts pulled for C2 Circuit Board
01/03/2008 113443 5C parts pulled for C8 Circuit Board
01/02/2008 094231 6X parts pulled for C2 Circuit Board
11/08/2007 092054 2B parts pulled for C5 Circuit Board
09/12/2007 201309 22X parts pulled for C3 Circuit Board
09/12/2007 162412 5C parts pulled for C1 Circuit Board
Can you help on how I can sort the records in the proper order? One way I can do this is to sort the records in DESCENDING Sequence by YEAR/MONTH/DAY then TIME (Descending). If I use the Record Sort Expert, The Record Sort Expert defines the whole field. The field is defined in the format Month/Day/Year.