I want to make a query which figures out profit made from a certain type of room according to the month and year. How do I do this? Here is my database. https://www.dropbox.com/s/vxz0xqezti...%20Hotel.accdb
I want to make a query which figures out profit made from a certain type of room according to the month and year. How do I do this? Here is my database. https://www.dropbox.com/s/vxz0xqezti...%20Hotel.accdb
G'd morning Troop,
First you should choose a naming convention for your objects and follow the good practices, such as: no spaces for field names, no special characters (except underscore) do not use the same name for the field for the text box, give meaningful names to your buttons etc. and finally at least build your tables with the 3rd normal form. Rebuild your db now that is in the planning stage.
Being said that, unless you want to build a messy query you should remove the prices from the room table, create another table for prices and months, then you will easily build any query.
Question: How do you manually calculate the profit?
OK, thanks for that. I want to figure out the profit without having to make a table for months and years. How would I go about making the query now?G'd morning Troop,
First you should choose a naming convention for your objects and follow the good practices, such as: no spaces for field names, no special characters (except underscore) do not use the same name for the field for the text box, give meaningful names to your buttons etc. and finally at least build your tables with the 3rd normal form. Rebuild your db now that is in the planning stage.
Being said that, unless you want to build a messy query you should remove the prices from the room table, create another table for prices and months, then you will easily build any query.
Question: How do you manually calculate the profit?
G'd Afternoon Troop,
Please don't get me wrong, your design won't let you do that in a "proper" way. I can't tell you with that design what to do because it's just not right.
Like you have your design, you're not considering anything. If this is a real application you just can't charge me for any service selectively.
If i stay 5 days and i want the service laundry just 2 of them how are you going to handle? there is no rule to avoid over booking or booking the same room twice. Why do you need a years table? why the 12 months if you can do it by seasons?
Take a look at this model, try to understand and let me know.
Last edited by Estuardo; 04-22-2013 at 08:56 AM. Reason: spelling... again...