Hello,
I have a problem in my query and I do not see how me to leave there. I have a query with these fields, Type, Series, Intervening and End. I can have several times the same Type with the same Series, the same Intervening and different End_Dates. If I have two dates, I can reach the first date by word FIRST and the last by word LAST. My problem is that I wish to reach the number in second, third etc position. It is possible to create a column after End_Date and which indicates by a figure the position of End_Date in the order chonologic, of oldest with most recent, for the same Type and Series. Is it possible to do it directly in Access or VBA?
Code: My Starting Request:
SELECT [Type], [Series], [Intervening],[End_Date]
FROM [Prev]
ORDER BY [Type], [Series], [End_Date];
Type........Serie.....Intervening.....End_Date
124.........13745....684.................09/09/2003
124.........14013....680.................25/02/2003
124.........14013....680.................14/05/2003
124.........14013....680.................02/09/2003
124.........14021....384.................15/07/2003
124.........14089....680.................12/02/2003
124.........14089....680.................17/09/2003
124.........14089....680.................18/06/2003
124.........14089....680.................20/06/2003
124.........15159....184.................01/04/2003
How must I make in Access/VBA to create the Number field and to insert a number in the chronological order for the same Type and Series.
Type........Series....Intervening.....End_Date......Number
124.........14089....680.................12/02/2003...1....... <--Oldest
124.........14089....680.................18/06/2003...2....... <--
124.........14089....680.................20/06/2003...3....... <--
124.........14089....680.................17/09/2003...4....... <--The Last
124.........13745....684.................09/09/2003...1....... <--Oldest
124.........14013....680.................25/02/2003...1....... <--Oldest
124.........14013....680.................14/05/2003...2....... <--
124.........14013....680.................02/09/2003...3....... <--The last
124.........14021....384.................15/07/2003...1....... <--The last
Thanks for your help
Nilses
I have a problem in my query and I do not see how me to leave there. I have a query with these fields, Type, Series, Intervening and End. I can have several times the same Type with the same Series, the same Intervening and different End_Dates. If I have two dates, I can reach the first date by word FIRST and the last by word LAST. My problem is that I wish to reach the number in second, third etc position. It is possible to create a column after End_Date and which indicates by a figure the position of End_Date in the order chonologic, of oldest with most recent, for the same Type and Series. Is it possible to do it directly in Access or VBA?
Code: My Starting Request:
SELECT [Type], [Series], [Intervening],[End_Date]
FROM [Prev]
ORDER BY [Type], [Series], [End_Date];
Type........Serie.....Intervening.....End_Date
124.........13745....684.................09/09/2003
124.........14013....680.................25/02/2003
124.........14013....680.................14/05/2003
124.........14013....680.................02/09/2003
124.........14021....384.................15/07/2003
124.........14089....680.................12/02/2003
124.........14089....680.................17/09/2003
124.........14089....680.................18/06/2003
124.........14089....680.................20/06/2003
124.........15159....184.................01/04/2003
How must I make in Access/VBA to create the Number field and to insert a number in the chronological order for the same Type and Series.
Type........Series....Intervening.....End_Date......Number
124.........14089....680.................12/02/2003...1....... <--Oldest
124.........14089....680.................18/06/2003...2....... <--
124.........14089....680.................20/06/2003...3....... <--
124.........14089....680.................17/09/2003...4....... <--The Last
124.........13745....684.................09/09/2003...1....... <--Oldest
124.........14013....680.................25/02/2003...1....... <--Oldest
124.........14013....680.................14/05/2003...2....... <--
124.........14013....680.................02/09/2003...3....... <--The last
124.........14021....384.................15/07/2003...1....... <--The last
Thanks for your help
Nilses