I think this does it.
C(r,r1)C(N-r,n1-r1)/C(N,n1) *
C(r-r1,r2)C(N-r-n1+r1,n2-r2)/C(N-n1,n2) *
C(r-r1-r2, r3)C(N-r-n1+r1–n2+r2,n3-r3)/C(N-n1-n2,n3)
The first term is for Group 1, selecting r1 red out of r red and n1-r1 black out of N-r black divided by the number of combinations of n1 things out of N.
The second term for Group 2 is the same idea after removing the Group 1 r1 reds from the original r reds and the Group 1 n1-r1 blacks from N-r original blacks
Similarly the third term accounts for the sampling done for the first two groups.
Some simplification of the third term is possible but this form shows the symmetry -- assuming it's right, of course

---------
On rechecking, the third term can sure be simplified. It has to be 1. If you select r1 in group1 and r2 in group 2, then the third group has to have r3.
Last edited by statmanhal; 09-21-2009 at 09:16 PM.
Reason: Found a simplification.