March 31, 200520 yr I would like, on a form, to be able to have running information concerning miles traveled per month, and have this visible on the form all the time. There would be twelve calculated fields and when mileage is entered in, say, January the total miles traveled would be displayed in the January field. Each time a January date is entered the miles driven will be updated in the January field. And so on for each month I can get the total miles to work, but not the individual months. Suggestions?:? Thanks
March 31, 200520 yr I presume when you are adding mileage, you are making a new record. For the sake of argument, say you have only two fields, Date and Mileage. If there are three entries in January and two in February, in list view they might look like: 1/3/05 23.4 1/8/05 56.8 1/9/05 87.2 2/4/05 21.8 2/7/05 69.7 What you need is a calc field for each month that will be populated with mileage only if the date field is correct. Using February for our example, our new Feb_Calc would have this as a calc: Case (Month(DateField) = 2, Mileage, 0) This field will contain a zero across all records, except those with February dates. Make a summary field for each of these monthly calc fields and place them on your layout. This gives you the flexibility of backdating. Add a February mileage that was overlooked and the calc field adjusts to account for it. Steve Brown
April 3, 200520 yr Author Thanks for the reply, but I guess I need to explain more for what I am looking for. On the form I will have 12 months listed, and in these fields I need to see the running monthly totals of miles driven in the corrisponding month. As an entry is made for a day in February the February grand total will reflect this change thus totaling all the February dates. Thanks again
April 4, 200520 yr I don't see how your request differs from my solution. I may be missing something, but if you made twelve calculation fields for display & summary as I described, then each (summary) field would show total miles in that month. Go back to your original data entry fields, and add a new February date & mileage, and the total will change to reflect it. Steve Brown
Create an account or sign in to comment