Hi I have table (tblLocationPatients) with fields YearId, Location, SchoolTrips, ClinicTrips and TotalTrips
I want to DSum TotalSchoolTrips and TotalClinicTrips by Location and Year. (Sometimes schools and clinics are in the same location - I need to know how many trips we make to the same location in a year.
My form is [Forms]![FrmLocationPtsDataEntry] and I have the Location and YearID on the form that I want to match the DSum to
Me.TotalLocationTrips = DSum("[TotalSchoolTrips] And [TotalClinicTrips]", "LocationTrips", "[YearID] = " & [Forms]![FrmLocationPtsDataEntry]![YearId] & " And [Location] = " & [Forms]![FrmLocationPtsDataEntry]![Location])
I have tried various diff syntaxes, but it keeps throwing errors.
Someone please help me off the ledge here. Thank you.
Kevin Robertson
@Reply 2 years ago
Sum up TotalSchoolTrips and TotalClinicTrips seperately.
You can store each value in Variables and then add the two values together.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.