Hi Folks, I am new on this forum and very much at early stage of learning VBA.
I have this problem to solve, and would just appreciate any ideas on a starting point.
I have a table which ( amongst others) has the variables
NameOfHorse(String);RaceDateTime(Date/Time);FinishPosition(Int)
The horse and RaceDateTime of race (together with track not shown) creates a unique combination for each record.
My aim is to populate another field with a record of the FinishPosition for the last "n" races. In the form, for example, "143861" ( as a String).
In this example, I guess I would needto gather an array taken from the FinishPosition Variable from the previous six races for that horse and transpose it into a text field with the most recent Finish Postion ( ie the previous race) being at the right of the string.
So it would read for example:
Shergar 07/06/2015 2 143861 and be interpreted as "In this race ran on 017/06/2015 Shergar came 2nd, and in the previous 6 races Shergar (most recent first) came 1st, 6th, 8th, 3rd, 4th and 1st. (ie recent form)
(I will actually use HorseId rather than HorseName in query, but this is just to illustrate)
The problem I am envisaging is how to use dateTime field to collect the data in the correct order
Any pointers would be much appreciated, and I will come back with my final code to share..
Cheers
Phil
I have this problem to solve, and would just appreciate any ideas on a starting point.
I have a table which ( amongst others) has the variables
NameOfHorse(String);RaceDateTime(Date/Time);FinishPosition(Int)
The horse and RaceDateTime of race (together with track not shown) creates a unique combination for each record.
My aim is to populate another field with a record of the FinishPosition for the last "n" races. In the form, for example, "143861" ( as a String).
In this example, I guess I would needto gather an array taken from the FinishPosition Variable from the previous six races for that horse and transpose it into a text field with the most recent Finish Postion ( ie the previous race) being at the right of the string.
So it would read for example:
Shergar 07/06/2015 2 143861 and be interpreted as "In this race ran on 017/06/2015 Shergar came 2nd, and in the previous 6 races Shergar (most recent first) came 1st, 6th, 8th, 3rd, 4th and 1st. (ie recent form)
(I will actually use HorseId rather than HorseName in query, but this is just to illustrate)
The problem I am envisaging is how to use dateTime field to collect the data in the correct order
Any pointers would be much appreciated, and I will come back with my final code to share..
Cheers
Phil