May 9, 200520 yr Newbies I tend to apply this script in an inventory db I'm working on but for discussion sake, say I have a db of 5 automobiles, all accords but different cars, unique Licence. 1. Honda, Accord, Licence, Date,Odometer,Fuel purchased 2. Honda, Accord, Licence, Date,Odometer,Fuel purchased 3. Honda, Accord, Licence, Date,Odometer,Fuel purchased 4. Honda, Accord, Licence, Date,Odometer,Fuel purchased 5. Honda, Accord, Licence, Date,Odometer,Fuel purchased The original record for each car was created when the car was purchased and a new record is created every time gas is put in the car. So now the bd contains, say 200 records. I am trying to come up with a script that will pull out the most recent occurrence (Date) for each car and display this in a Table. This new Table should only contain 5 records. Thanks for any suggestions on how to go about this, I'm stumped! Ron
May 10, 200520 yr All i can think of right now... Is that you would need a script to sort your table by most recent date then loop to find the CAR #1; put that data in a temp table (add new record) continue your loop searching for CAR #2 etc... At the end display the temp table and you will have your 5 cars. Finally delete all temp records in your temp table to be ready for the next time. Another way would be a related table based on plate# that stores all fuel purchases, that way you could show (in a portal) all fuel transactions for a given car. HTH Dan
Create an account or sign in to comment