Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using sum in a Function

Status
Not open for further replies.

cneill

Instructor
Mar 18, 2003
210
GB
How do I do the calulation in this function? I want to add all the Delivered values that meet the Case criteria
thoughts please

Public Function CFLDelivered()
Dim SchemeID As String, Delivered As String, Total As String

SchemeID = Forms![FrmElectricalFundingData].SchemeID
Delivered = Forms![FrmElectricalFundingData].Delivered

'Total = Sum([Delivered]) this is were it goes wrong

Select Case Forms![FrmElectricalFundingData].SchemeID
Case 4 Or 44 Or 75
Total

End Select

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top