I haven't worked with web stuff, so your syntax is a little unfamiliar, but just a couple of suggestions.
The query builder in Access is invaluable for getting your SQL right. You can build your query visually, check that it does what you want, then copy the code into your program
You need to...