Using the query below,
1. How could one add the table ID number (Autonumber) of the sortfield into the query (not for any sorting purpose, just to add data in)
2. The query adds a leading record space, how can I eliminate nulls
3. If I wanted a blank row to give a break between items to make reading easier (continuos form display), how could I do it. eg:
Monday Garage
Shop
----- SPACE -----
Tuesday Chemist
------ SPACE -----
etc
SELECT [First field] AS TextA, Min([Second field]) As TextB, [First field] AS sortField
FROM yourTable
GROUP BY [First field]
UNION SELECT " ", [Second field], [First field]
FROM yourTable A
WHERE [Second field] > (SELECT Min([Second field]) FROM yourTable B WHERE B.[First field] = A.[First field])
ORDER BY 3, 2;
Thought I would post a seperate thread, as I star is pretty mean to offer for the effort. Regards
1. How could one add the table ID number (Autonumber) of the sortfield into the query (not for any sorting purpose, just to add data in)
2. The query adds a leading record space, how can I eliminate nulls
3. If I wanted a blank row to give a break between items to make reading easier (continuos form display), how could I do it. eg:
Monday Garage
Shop
----- SPACE -----
Tuesday Chemist
------ SPACE -----
etc
SELECT [First field] AS TextA, Min([Second field]) As TextB, [First field] AS sortField
FROM yourTable
GROUP BY [First field]
UNION SELECT " ", [Second field], [First field]
FROM yourTable A
WHERE [Second field] > (SELECT Min([Second field]) FROM yourTable B WHERE B.[First field] = A.[First field])
ORDER BY 3, 2;
Thought I would post a seperate thread, as I star is pretty mean to offer for the effort. Regards