hi. this query is giving me issues. i created it in Access query design n then copied it over to vba. does not work n i cant seem to figure out why. plz help
strSql = "SELECT DRAWS.PartnerId, Sum(DRAWS.DrawAmount) AS SumOfDrawAmount FROM DRAWS GROUP BY DRAWS.PartnerId HAVING (((DRAWS.PartnerId)= " & cust & "));"
Set rst = CurrentDb.OpenRecordset(strSql)
total = rst!SumOfDrawAmount
MsgBox "The valu of loans is " + total
the rrror is here.
Set rst = CurrentDb.OpenRecordset(strSql)
to few parameters it says
strSql = "SELECT DRAWS.PartnerId, Sum(DRAWS.DrawAmount) AS SumOfDrawAmount FROM DRAWS GROUP BY DRAWS.PartnerId HAVING (((DRAWS.PartnerId)= " & cust & "));"
Set rst = CurrentDb.OpenRecordset(strSql)
total = rst!SumOfDrawAmount
MsgBox "The valu of loans is " + total
the rrror is here.
Set rst = CurrentDb.OpenRecordset(strSql)
to few parameters it says