@Mark,
Check out this thread from @JarrettM. I think his approach will get you everything you need here.