Access: How to Combine Data from Two Rows in a Query
You could use a CASE expression or the IIf() function to first order the two values and then group by them:

with CASE expression:

SELECT CASE WHEN Sex1 &lt; Sex2 THEN Sex1 ELSE Sex2 END 
       &amp; CASE WHEN Sex1 &lt; Sex2 THEN Sex2 ELSE Sex1 END AS Sex,
       Sum(Number) AS [Total Number]
FROM TableName
GROUP BY CASE WHEN Sex1 &lt; Sex2 THEN Sex1 ELSE Sex2 END,
         CASE WHEN Sex1 &lt; Sex2 THEN Sex2 ELSE Sex1 END ;


with IIf() function:

SELECT IIf(Sex1 &lt; Sex2, Sex1, Sex2) &amp; IIf(Sex1 &lt; Sex2, Sex2, Sex1) AS Sex,
       Sum(Number) AS [Total Number]
FROM TableName
GROUP BY IIf(Sex1 &lt; Sex2, Sex1, Sex2),
         IIf(Sex1 &lt; Sex2, Sex2, Sex1) ;