
HELP...Queries return different results in VB than Access
Hi,
I created a query in Access:
SELECT -sum([Col1] Like "*Preferred*") AS [Preferred Only], -sum([Col1] Like
"*Material*") AS [Material Only], -sum([Col1] Like "*Both*") AS [Preferred
and Material], -sum([Col1] <>"*None*") AS [Total Preferred and/or Material]
FROM Table1;
In Access, I get these results:
Preferred Only Material Only Preferred and Material Total
Preferred and/or Material
1 2 2
5 (These Are Correct)
BUT...When I use VB6 Data Envirnment Settings, it shows all the fields in
the heirarchy but I get these results:
Preferred Only Material Only Preferred and Material Total
Preferred and/or Material
0 0 0
13 (The amount of records in Table1)
The settings in the command properties are correct as follows:
Name = Command1
Connection = Connection1
Database object = View
Object Name = Query1
Could sombady direct me in the right path?
Thank You
J