C
Charlie
I got a table with
Sample number
plus size
minus size
The table can contain the same sample numbers with different sample size
ranges and there will be a lot off different sample numbers… ie 111222 with
size range 3 - 5 , 111222 with size 5 - 7 and 111333 with size 7 - 10 etc
I have written the following query to sort the records by sample number and
plus sample size. So it firstly groups all sample numbers together and sorts
the sizes based on the plus size field, output becomes
sample number plus size
111222 size 5
111222 size 9
111333 size 3
111333 size 7 etc
SELECT [Inbound Samples].[Sample Number], [Inbound Samples].[Stockpile
Number], [Sizing Samples].[Last Update], [Sizing Samples].[Minus Size],
[Sizing Samples].[Plus Size], [Sizing Samples].Result
FROM [Inbound Samples] INNER JOIN [Sizing Samples] ON [Inbound
Samples].[Sample Number] = [Sizing Samples].[Sample Number]
ORDER BY [Inbound Samples].[Sample Number], [Sizing Samples].[Plus Size];
I then create a datasheet view form based on the query.
The sort is correct for the initial first time (sorted by sample no and
sample size) however when i sort within the dataform (right click a data
column and sort) it is only then sorted by that sample number or sample size
and loses the settings off sorting by both. Once it is sorted in this manner,
It asks the user if you want to save the form layout..If yes is selected the
sorting within the query itself is lost.
My question is the best way to achieve this subgroup sorting without
creating too many buttons etc.. If I can somehow turn off the prompt asking
for the view to be saved this will do the trick...or is there some
functionality I can put into access forms to do subgroup sorting?
thanks
I am trying to sort the output by sample number and plus size
Sample number
plus size
minus size
The table can contain the same sample numbers with different sample size
ranges and there will be a lot off different sample numbers… ie 111222 with
size range 3 - 5 , 111222 with size 5 - 7 and 111333 with size 7 - 10 etc
I have written the following query to sort the records by sample number and
plus sample size. So it firstly groups all sample numbers together and sorts
the sizes based on the plus size field, output becomes
sample number plus size
111222 size 5
111222 size 9
111333 size 3
111333 size 7 etc
SELECT [Inbound Samples].[Sample Number], [Inbound Samples].[Stockpile
Number], [Sizing Samples].[Last Update], [Sizing Samples].[Minus Size],
[Sizing Samples].[Plus Size], [Sizing Samples].Result
FROM [Inbound Samples] INNER JOIN [Sizing Samples] ON [Inbound
Samples].[Sample Number] = [Sizing Samples].[Sample Number]
ORDER BY [Inbound Samples].[Sample Number], [Sizing Samples].[Plus Size];
I then create a datasheet view form based on the query.
The sort is correct for the initial first time (sorted by sample no and
sample size) however when i sort within the dataform (right click a data
column and sort) it is only then sorted by that sample number or sample size
and loses the settings off sorting by both. Once it is sorted in this manner,
It asks the user if you want to save the form layout..If yes is selected the
sorting within the query itself is lost.
My question is the best way to achieve this subgroup sorting without
creating too many buttons etc.. If I can somehow turn off the prompt asking
for the view to be saved this will do the trick...or is there some
functionality I can put into access forms to do subgroup sorting?
thanks
I am trying to sort the output by sample number and plus size