Hello,
Situation:
I have a table that is created when the user wants to open a graph, and it is deleted when the user closes such graph.
I read data (dates, eg. 30/10/01) from a txt file into an array. My array has two columns, one the dates and the other a sum of the coincidences of the month.
Then, I input the values in the array into the table I just created.
Then I set the rowsource of the graph to the table.
Problem:
In the txt file, some records are not sorted, and therefore, I can have the 21/07/01 after the 30/10/01.
When I put this into the table, obviously the table then is not sorted.
My intention was to sort it out in the rowsource of the graph, and thus I use:
grpusage.RowSource = "SELECT Format([MyDate],""MMM \'YY""
),sum([MyUsers]) AS [Times logged to database] FROM [USAGE] GROUP BY (Format([MyDate],""MMM \'YY""
) ORDER BY (Format([MyDate],""MMM \'YY""
) ASC"
I get the dates in the format mm 'yy but the "ORDER BY (Format([MyDate],""MMM \'YY""
) ASC" does not sort the data. In the graph I get July'01 before June'01
When I create the table, I use:
.Fields.Append .CreateField("MyDate", dbDate)
.Fields.Append CreateField("MyUsers", dbInteger)
So, the field MyDate is designed as date.
Does anybody have a clue on what the problem is?
If not, alternative solutions would also be helpful.
Thanks,
Klasse
Situation:
I have a table that is created when the user wants to open a graph, and it is deleted when the user closes such graph.
I read data (dates, eg. 30/10/01) from a txt file into an array. My array has two columns, one the dates and the other a sum of the coincidences of the month.
Then, I input the values in the array into the table I just created.
Then I set the rowsource of the graph to the table.
Problem:
In the txt file, some records are not sorted, and therefore, I can have the 21/07/01 after the 30/10/01.
When I put this into the table, obviously the table then is not sorted.
My intention was to sort it out in the rowsource of the graph, and thus I use:
grpusage.RowSource = "SELECT Format([MyDate],""MMM \'YY""
I get the dates in the format mm 'yy but the "ORDER BY (Format([MyDate],""MMM \'YY""
When I create the table, I use:
.Fields.Append .CreateField("MyDate", dbDate)
.Fields.Append CreateField("MyUsers", dbInteger)
So, the field MyDate is designed as date.
Does anybody have a clue on what the problem is?
If not, alternative solutions would also be helpful.
Thanks,
Klasse