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

I want to make a calender that shows rental availability

Status
Not open for further replies.

AKAC00L

Technical User
Jan 21, 2002
15
ES
Hi,

I wrote fao rick as he seems to know about this stuff fairly well and one of his old posts helped with the other prob I had.

Anyway, what I have is a rental company with several apartments to rent,

the database has the fileds (amongst others) apartment ID, client ID, rental start date, number of days rent.

what I want is a report that shows the days of the month, then for each apartment simply marks the dates in red when the apartment is occupied.

I imagine it looking something like this:

Month: AUG
APT ID: 1
|1|2|3|4|5|6|7|8|9| etc.
any help would be gratefull apreciated.
 
AKAC00L

I have created something similar to what you are after, my use was for employee leave over a month, If you swap employee for Apt ID it would work on the same principles.

So here's what I do.
I Create a table with the following fields for the month
txtAptID (text or number)
Day1 Yes/no
Day2 Yes/no
Day3 Yes/no
Day4 Yes/no
etc... to
Day31 Yes/No

I then get any holiday (or in your case dates occupied) and loop through each day occupied and change the day number in the table above to a yes. I'm then left with the days on leave indicated by yes .

I know it's not what you are after as it does not change the text colour but it could set you on the right path.

If you would like the code and form let me know and I'll send it (I'll modify it for your situation)

Good luck

Chris
 
sounds like a good idea and I think I could easily modify it so that it does the red thing, only thing is: is it automatic? i.e. do I have to manually tick each box for each date or have you done a script to do it automatically? either way please send me a copy of the files.

Thanks a bunch

AKA C00L

aka-c00l@softhome.net
 
AKACool

It's all done automatically you just select the month and it does it for you, I'll send the database some time in the next day or so.

Cheers

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top