var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: using cross tbl queries
I'm struggling with a crosstab query I have created to select the last two sets of data from a tbl. The tbl has the following fields
What I am attempting to do is select the last two records for each Veh_Reg to allow me to calculate the difference between the first and the last date.
Any help or suggestions on how to extract this data out of the tbl would be appreciated, as it is driving me mad!!!!!
create a group by query to get the first and last (prob a min and max on odo reading). Then create another query using the group by query as the source.
okay... but would that work if every record has a uniqueness. Each Veh_Reg could have multipul odo readings over several weeks, meaning that I would only want to select the last two records.
Also would this multipul data entry against a Veh_Reg mean that the group by query would fail?
Is there no way of using a select qry to bring up the last two records for every vehicle reg??
I believe this is what you will want:
Check out Method 1. You should be able to get the last two readings with the Top 2 if you order it by the date of the reading.