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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation

Status
Not open for further replies.

Spikemannen

Instructor
Feb 22, 2005
58
SE
Hi everybody!

I have a table:

ID (calc)
Cost per day (currency)
From (date)
To (date)
Number of people (numbers)

And I want to calculate like this:

Cost per day X Number of people X amount of days between from and to

My query looks like this now:

ID Sum:[Cost per day]*[Number of people]
tblCost

How should I continue?

Best Regardz,

Spikemannen
 
Thank you.

I have wrote:

Days: DateDiff("y",[From], [To])

But I get this error:

Microsoft Access
Expression syntax not valid

Best Regardz,

Spikemannen
 
Still the same error message.

Access marks the first , .

Best Regardz,

Spikemannen
 
In the query grid:
MyCalc: [Cost per day] * [Number of people] * ([To] - [From])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top