An easy way to get the SQL necessary from Access is to setup the query in access (make sure it works) and click View --> SQL to get the sql necessary to put it in your program

Tom