I'm converting from VBA to ASP both in Access and I'm having a problem with Grouping it's just not the same when you use the GROUP BY everything I read says I have to Group By all the fields that I have in the query?
This is useless for me as I need to group by the customers name or number etc... And total up the hours but by grouping both it gives me several small entries like all the ones with one hour then all the ones with two hours etc... Driving me crazy.
Here is the SQL Query:
strSQL = "SELECT tblservices.fldcontact, tblservices.fldhours, Sum(tblservices.fldhours), tblcontacts.fldcontact, tblcontacts.fldfirstname FROM tblservices INNER JOIN tblcontacts ON tblservices.fldcontact=tblcontacts.fldcontact GROUP BY tblservices.fldcontact, tblservices.fldhours, tblcontacts.fldcontact, tblcontacts.fldfirstname"
This is useless for me as I need to group by the customers name or number etc... And total up the hours but by grouping both it gives me several small entries like all the ones with one hour then all the ones with two hours etc... Driving me crazy.
Here is the SQL Query:
strSQL = "SELECT tblservices.fldcontact, tblservices.fldhours, Sum(tblservices.fldhours), tblcontacts.fldcontact, tblcontacts.fldfirstname FROM tblservices INNER JOIN tblcontacts ON tblservices.fldcontact=tblcontacts.fldcontact GROUP BY tblservices.fldcontact, tblservices.fldhours, tblcontacts.fldcontact, tblcontacts.fldfirstname"