how to select data for calculation

Erictsang

New member
Local time
Today, 09:19
Joined
Aug 21, 2017
Messages
7
Dear Guru

I have a question in selecting data for calculation

I use that for hotel room calculation

Date of stay

1/10 - price : 100
2/10 - price : 120
3/10 - price : 100

Now guest stay from 1- 4 Oct , so i need to calcalate the sum of price based on the period of their stay

How can i do that ?

Eric
 
something like

Code:
SELECT sum(price) as totalprice
FROM tblRates
WHERE ratedate between [firstdateofstay] and [lastedateofstay]-1
 
The suggestions offered work as long as there is a price in your price table fore every single day for every single room or room class. Is that what you have? Or, do you have a more generic model where you have a price by day of the week with perhaps unique prices for certain days such as New Year's Eve?
 
CJ

Something similar but have to lookup the price with the date

I have two criteria to lookup

a) Hotel
b) date of stay

i am new for Access formula.

If i built a table, for hotel with different date price which , then, Reservation Form can calcualte the total room costs ?

Table for room rate [form]![date] ?? i do not know how?!
Hotel
Date
Price
 
As Pat has suggested, you need to know how your data is structured. So are you asking how to structure your data?

If so, you need to describe your business - how it works in the context of the question you are asking
 

Users who are viewing this thread

Back
Top Bottom