View Single Post
Old Jun 6th, 2007, 6:07 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You have to apply COUNT to the same query that provides the correct results. Does Access not have a count function that you can merely pass the result to? Something like
result = SELECT DISTINCT  [SV-5.NameA]
FROM ([SV-5] LEFT JOIN SFtoFD ON [SV-5].NAMEA = SFtoFD.NAMEB) LEFT JOIN SFtoSV4 ON [SV-5].NAMEA = SFtoSV4.NAMEB
WHERE SFtoSV4.NAMEB IS NULL AND  SFtoFD.NAMEB IS NULL;

records = num_rows (result)
I don't have Access on this system, so I can't check for you. Look at your docs.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote