I assume you are connecting to access and showing everything you need to
already. The totals are pretty easy to do. If you are displaying all
the records, just sum up the items as you go along. It might be more
helpful if you could describe your situation better, but here goes...
If you want to just display the totals, "select count(*) from table
where ..." to get the total in a recordset. Then take the First value
in the first row ( recordset.Fields(0).Value ) to get the count that was
returned.
Here is a simple function that duplicates (mostly?) VB's Dlookup
function. It assumes a global connection called 'oConn' though.
Function DLookUp(sExpr , sDomain, sWhere)
dim oResult
on error resume next
oResult = oConn.execute("select " & sExpr & " from " & sDomain & "
where " & sWhere).Fields(0).Value
if IsNull( oResult ) then oResult = ""
DLookUp = oResult
End Function
jjrmy1 (AT) earthlink (DOT) net wrote:
Quote:
Does anyone know how, using asp and an access database, one could display the total of the records retrieved. all of the records
retrieved are #'s and I need to display the sum of all those #'s.
thanks in advance! |