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

This ones a real challenge

Status
Not open for further replies.

Philly44

Programmer
Jul 17, 2001
277
CA
Ok here goes:
I have report that I have to make resemble a calender(I know theres probably a ton of OCX's that could do this but I can't use them). I have it setup with 35 TextBoxes all named accordingly to their position on the Report. Right now when the Report Opens it will prompt for the month and then based on that it will put "1" in the first day of that month. The problem That i have is I need to put the remaining days of the month into their appropriate boxes based on the where the first day of the month was.I know I can hard code these values for each one but thats an insane amount of code to do. Speed is a factor for this system. Any help on this would be greatly appreciated. Thank you in advance.
 
I love a challenge! Ok, honestly, I have no idea how to do what you are asking, but I do have some ideas tickling the back of my mind.

There are only 28 possibilities for the layout of the month. 1st of month is Sunday or Monday or Tues, etc (7 possibilities) times possible days in month.

With that in mind perhaps you could create a table which encodes all 28 possibilities. 35 fields in the table which correspond to the 35 boxes on your report. 28 records in the table which would match the 28 possibilities above.

Create a form to prompt the user for a month to display before calling the report. You could then add code to the form to determine which of the 28 records the month falls into. Then call the report with a filter for the appropiate record.

Did any of that make sense? You piqued my curiosity. Let me know how it works out.

 
Thanks DougP I think that code will help.
Maquis: That sounds like a really good way of doing it but That would actually cause me more problems down the road as after I get the calender formated I have to fill it with Booking information for everyday Thanks anyways though.

Any other ideas are more than welcome

Thanks Again
 
If you look under the faqs in access-forms there is code to create your own calendar. You should be able to use this same coding principle to set up your report.Good luck
 
I have a couple sample database with a calendars exactly like you are talking about. JimmyTheGeek made them and they use NO ocx's and only textboxes and code. Very fast, very transportable, and very good looking. Send me your email address and I can send them to you.
Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top