how do you sum in VBA

reel knotty

Registered User.
Local time
Today, 22:31
Joined
Jun 5, 2002
Messages
71
I know I posted this below but i thought it might be a bit cluttered so I am cleaning it up and re posting...

I have a form with a function that calls an API and returns miles between 2 zip codes. I need to sum the miles but access does not allow summing of a calculated fields. So what I would like to do is sum this field in VB. How exactly do you do this? I was looking for a sum function or the like and have had no luck to this point. I am hoping to get a bit of help from the guru's!!

Thanks
Nate
 
Domain Aggregate Function: DSum()
 
here is what i got please tell me its something stupid i have wrong:

Code:
Function sumiles(shipmentlookup As Form, milesfromdll As Double)
sumiles = DSum(milesfromdll, [shipmentlookup]![Form])


End Function


and in my control sorce i have:

=sumiles([shipmentlookup]![Form],[milesfromdll])
 

Users who are viewing this thread

Back
Top Bottom