I know this is not ideal, but it is quick and dirty. I need to run an update query, to update a table column for "Previous Mileage". going forward, I will have this table on the entry form and the user can fill it in.
This is an app for tracking costs for multiple cars, and when they run reports, they can choose any kind of date range. The mileage for that range needs the min and max mileage, but the min needs to actually be the last mileage from before the range.
Mileage is entered as a car cost (subform relationship to each car). It is only entered for gas cost types. For others, it is empty. By adding the field, the user will enter in a previous mileage always, so that we always have that value. I have given up doing this at the report. I just want to back fill the existing records and let the user take care of setting this value, going forward.
This is what the data looks like:
Cost Date - Cost Type - Cost - mileage - previous mileage
1/1/01 - gas - $32.00 - 10,100 - 0
2/15/01 - oil change - $40.00 - (null) - 10,100
2/28/01 - gas - $34.99 - 13,258 - 10,100
3/12/01 - body work - $515.00 - (null) - 13,258
That shows what the previous mileage needs to looks like. I am not sure how to write a query that will update that field.
If anyone could help, I really want to finish this project and get it back to the people who need it, before the holidays.
Thanks!
p.s. I originally tried to ask this as a form update question, but now I just want to update the table once, so that we can enter it manually going forward.
That thread is here:
thread702-1664286
misscrf
It is never too late to become what you could have been ~ George Eliot
This is an app for tracking costs for multiple cars, and when they run reports, they can choose any kind of date range. The mileage for that range needs the min and max mileage, but the min needs to actually be the last mileage from before the range.
Mileage is entered as a car cost (subform relationship to each car). It is only entered for gas cost types. For others, it is empty. By adding the field, the user will enter in a previous mileage always, so that we always have that value. I have given up doing this at the report. I just want to back fill the existing records and let the user take care of setting this value, going forward.
This is what the data looks like:
Cost Date - Cost Type - Cost - mileage - previous mileage
1/1/01 - gas - $32.00 - 10,100 - 0
2/15/01 - oil change - $40.00 - (null) - 10,100
2/28/01 - gas - $34.99 - 13,258 - 10,100
3/12/01 - body work - $515.00 - (null) - 13,258
That shows what the previous mileage needs to looks like. I am not sure how to write a query that will update that field.
If anyone could help, I really want to finish this project and get it back to the people who need it, before the holidays.
Thanks!
p.s. I originally tried to ask this as a form update question, but now I just want to update the table once, so that we can enter it manually going forward.
That thread is here:
thread702-1664286
misscrf
It is never too late to become what you could have been ~ George Eliot