[Solved] Calculation in Base

Creating tables and queries
Post Reply
Curt
Posts: 5
Joined: Tue May 17, 2016 5:40 pm

[Solved] Calculation in Base

Post by Curt »

I want to do a simple calculation in a form or database. (Fee + Mileage = Total)
I have these setup already with no calculations included. I want to calculate the mileage based on (Miles * .50) or $.50 per mile driven. I want to be able to enter the fee in one cell and the miles driven in the next and have the end result be a total for the fee and miles driven at $.50 per mile. I am not sure why this should be do complicated. I used to be able to do in in MS Works within the database without all the extra work (queries and tables etc...)
Any help would be appreciated.
Last edited by Curt on Mon May 23, 2016 3:06 pm, edited 1 time in total.
OpenOffice 4.1.2 on Windows 8.1
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Calculation in Base

Post by F3K Total »

Hi,
a simple query needed

Code: Select all

SELECT "ID", "FEE", "MILES", "FEE" + ( "MILES" * 0.5 ) AS "TOTAL" FROM "Table1"
see example
R
Attachments
Total.odb
(11.91 KiB) Downloaded 181 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Post Reply