filter first record of a new sequence

aussiehedge

Registered User.
Local time
Today, 17:28
Joined
Nov 24, 2006
Messages
10
Can you please assist. I need to only show the first record of a new sequence in a query. I have put a star against the records i need to filter. The length of the record may be different.
At the moment i use this to show all the records
Like [Forms]!
![headingrequery].[Form]!
& "*"
The form filed is result is 4802

heading
4802.10.00 *
4802.20*
4802.20.2
4802.20.21
4802.20.21
4802.20.21
4802.20.22
4802.20.29
4802.20.3
4802.20.31
4802.20.31
4802.20.31
4802.20.39
4802.20.4
4802.20.41
4802.20.41
4802.20.41
4802.20.49
4802.40*
4802.40.10
4802.40.10
4802.40.10
4802.40.20
4802.40.90
4802.54*
4802.54.10
4802.54.10
4802.54.10​
 
You may be able to use the FIRST function to achieve this, but you would need to add a like criteria also. Something like;

SELECT First(Heading) AS FirstOfHeading FROM Heading GROUP BY OtherFields HAVING (((Heading.
) Like "4802*"));​
 
I have managed to filter as required by using

SELECT Min(class.heading) AS MinOfheading, class.Option
FROM class
GROUP BY class.Option, Left(heading,6)
HAVING (((Min(class.heading)) Like [Forms]!
![headingrequery].[Form]!
& "*"));


The problem i have now is i cannot use the check box as my thinking suggests as access does not know what record to check within the group.​
 

Users who are viewing this thread

Back
Top Bottom