Senin, 30 Januari 2017

[MS_AccessPros] Re: Comparing price values and writing out a description

 

Hi John

Of course! I see the logic of your proposed table structure. I'm going to change the tables accordingly. 

I think I shall use an int for DayOfWeek corresponding to the result of Access' Weekday function (with Monday being the first day of the week). 

You assume correctly that some help with the function would be appreciated :-)


Lance

John  wrote:

Lance- 

For starters, your prices table isn't normalized. I assume you price rooms by room category, so your pricing table should look like: 

PriceID, RoomCategory, DayOfWeek, Price 

Next, you need a function to which you pass parameters of arrival date, departure date, and room category. Your function can "walk" through the reservation dates, calculate the day of the week, and do a lookup into your pricing table. To print a generic report for Mon-Sun of any week, you would call the function with the date of any Monday and the date of any following Monday. That would allow you to use the same function to generate a price list for a specific room or a price list for any week. 

I assume you need help writing the function … 😃 

__._,_.___

Posted by: Lance Gallant <istari.6@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar