0

In Microsoft Access I am trying to create a form to enter expense reports by their type of expense (i.e. Airfare, Meal). These expense reports often have multiple charges for each type of expense that I would normally have to add up each expense from each type before entering the total number for that type into the form. Of course this, while doable, is tedious as each type could have upwards of 20 charges.

What I want to do, and am wonder if it is at all possible, is enter all entries into one single form field that sums them all in order to be displayed.

If it helps this is what i'm imagining:

(10,15,30,5) all get entered into one field in a form

then 60 is shown because 10+15+30+5=60

I am wonder if this is at all possible and if it was, how would I be able to do it?

Community
  • 1
  • 1

1 Answers1

0

It is doable - read "10,15,30,5" as a string, convert it to an array using Split, then sum the elements of this array as numbers to obtain the sum.

However, this would be even more tedious and also error prone than doing it the right way from the beginning. Too smart shortcuts seldom pay off.

Gustav
  • 53,498
  • 7
  • 29
  • 55