<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2722.900" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>The
MiniCalendar has a 'cycle' mode, which allows you to have a second form open,
that shows the records for the date that the mouse is over on the
Minicalendar. So as you move the mouse around the calendar, the 'side'
form keeps up to date with the MiniCalendar.</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>I
think you are asking to create a monthly calendar report, where there are boxes
for each day of the month, offset then your typical wall calendar.
Ironically, the origins of the MiniCalendar is based on a form that was just
like that. It was a work scheduling form, where each day 'box' showed the
hours the employee was scheduled for. I created the first version of the
MiniCalendar, by shrinking everything down.</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>What
you would want is a report version of that. Not too difficult to do.
The process is just about the same as that used to create the minicalendar
form. Essentially you need 37 'boxes', with the appropriate data
displaying controls in each (everything labeled with a number at the end, like
DayBox1, DayBox2....DataLabel1, DataLabel2...etc.). You need 35 for a 5 by
7 grid, with a bottom row of 2. (So if the 1st is a Saturday, and the 31st
is a Monday, it shows appropriately.). Then you just have to run some
simple code to determine the first day of the month, and the number of days
in the month. Then you set an 'offset' variable. If the first day of
the month is a Sunday, the offset is 0, if it's Monday, the offset is 1, all the
way to if it's Saturday, the offset is 6. Thus, whenever you refer to a
control, by date, you take the number of the day of the month (1st through
31st), by using the Day() function, then you add the offset to get the 'box' or
control number to refer too. </FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>For
example, this month has 31 days, and the 1st is on a Tuesday. That means
that the offset would be 2. When the report opens/loads, you would do a
for 1=1 to 37 next statement, where you would set me(MyControlName &
i).Visible to whether or not the day is valid. To determine that, you
determine if i<=offset which would tell you which controls to show starting
from the front, and i-offset<=NumberOfDays , which hides the end controls
that don't represent the current month.</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>You
now have a grid representing the days of the month. To put the day of the
month in the boxes, on the initial loop that hides/shows the appropriate
controls, just set a little label's caption to i-offset, which will then number
the days correctly. Then, to fill the data in, pull up your recordset (for
the month), and run through each record. To 'know' what control gets the
data, you simply use the Day() function and the offset variable.
</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>For
example. If I have a record with 7-5-2003 as the data, by using the Day()
function, I would know that the date is for the 5th (it will return 5). By
adding the offset (of 2), we know that we would want to add the data to the
controls ending in 7.</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>So,
for example, we could use this line:</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2>Me(MyDataLabel &
(Day(rs.Fields("MyDateField").Value)+intMyOffsetValue).Caption=rs.Fields("MyDataField").Value</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2>Whalla, your entire calendar report is then filled with the appropriate
data with that line put into a For Next Loop of all your
records.</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>The
MiniCalendar Version 3 (the 97 version) has a lot of the functionality that you
want put into modules within the database. I have a function to return the
number of days in a month, the first day of the month, etc. (Those are
pretty easy, and I am pretty sure the latest version uses pretty good code (my
very first version was, quite frankly, attrocious, since I was just learning
VBA....of course the MiniCalendar was a wonderful learning tool, because it
forced me to get a much deeper understanding of a lot of things, when building
it.).</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>Now,
the beta version, which is 2000 only, has no modules, other then the form itself
(yet....). I did that intentionally, because the last complete version
requires several 'objects' to be ported into a database, and one of the features
I wanted incorporated into the new version, was that I wanted it to be JUST the
form that needs to be imported. Also, I had several 'internationalists'
complain that the MiniCalendar starts with Sunday as the first day of the
month. (The current version does reword the month list and day names based
on their locale.). So the Beta version (which has been collecting dust
since the fire in my apartment!), has already had a flexible start day built in,
you can set the first day of the week to be Sunday through Saturday.
</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff size=2>I have
literally broke the secret calendar builder's code of silence, so I
probably will not be alive tomorrow! <evil grin>. Just
kidding. Hopefully if you read through this carefully, you'll understand
what I am talking about, and realize that what you are looking for is not very
difficult at all, you just have to understand the mathematics behind
it.</FONT></SPAN></DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550533421-15072003><FONT face=Arial color=#0000ff
size=2>Drew</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Susan Harkins
[mailto:harkins@iglou.com]<BR><B>Sent:</B> Tuesday, July 15, 2003 3:36
PM<BR><B>To:</B> Access Developers discussion and problem
solving<BR><B>Subject:</B> Re: [AccessD] Using Calender Pop-up (Date-selector)
from ADH<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Drew, right now I use an Access app for
scheduling, but also duplicate a task list in Outlook because I love the
calendar layout. Do you think your MiniCalendar could reproduce that in my
Access app? All I really want is to print tasks on the appropriate day and
print out a "calendar" page. It's a nuisance to have to use both and I just
haven't made the time to take a hand at doing it myself in Access.
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Susan H. </FONT></DIV>
<DIV><BR> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=969111120-15072003>I
have a form based calendar called the MiniCalendar. The last complete
version was built in Access 97. I used to have it on my website, but I
have yet to have any time to put it back on my new site. If you want,
I can email you a copy off list. (<A
href="mailto:dwutka@marlow.com">dwutka@marlow.com</A>). It's free to
use, and distribute, though the 'word doc' instructions were written for
version 2 (latest version is 3), so it's a little off, but the MiniCalendar
is pretty easy to use.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=969111120-15072003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=969111120-15072003>I
am still working on Version 4, which is going to be for 2000 and up only
(ran into a few walls in 97 for features that I want
incorporated).</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=969111120-15072003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=969111120-15072003>Anyhow, just give a holler if you want a copy of
that or not.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=969111120-15072003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=969111120-15072003>Drew</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Backroads Data
[mailto:backroad@idir.net]<BR><B>Sent:</B> Tuesday, July 15, 2003 9:23
AM<BR><B>To:</B> AccessD<BR><B>Subject:</B> [AccessD] Using Calender
Pop-up (Date-selector) from ADH<BR><BR></FONT></DIV>
<DIV>Hi all -</DIV>
<DIV> </DIV>
<DIV>In Access97, I've used the pop-up calender / date-selector from
Access97 Developer's Handbook (pp. 488-491) extensively throughout an
application. I've had reports from various users that the calendar
will quit working intermittantly for a while, then start to work
again. </DIV>
<DIV> </DIV>
<DIV>By "not working", they mean the calendar form appears, they can
navigate to any date, but when selecting a date the system fails
to update the date field (text box on the form) with the newly selected
date. It will be in this state for a while, then will begin working
properly again.</DIV>
<DIV> </DIV>
<DIV>Below is the code I'm using to call the calendar and update the date
field. Has anyone had any similar experience, or have any ideas what
might be happening? TIA.</DIV>
<DIV><BR>Private Sub dateStart_DblClick(Cancel As Integer)</DIV>
<DIV> </DIV>
<DIV> Dim dateNew As
Variant<BR> <BR>
Let dateNew = adhDoCalendar(Me.dateStart) 'get user's
selected date<BR>
<BR> If IsNull(dateNew)
Then 'user cancelled
calendar
form<BR>
Exit Sub<BR>
Else<BR>
Me.dateStart =
CDate(dateNew)<BR> End
If<BR></DIV>
<DIV>End Sub<BR></DIV>
<DIV>Best Regards,</DIV>
<DIV> </DIV>
<DIV>Julie Schwalm<BR>Backroads Data<BR><A
href="http://www.backroadsdata.com">www.backroadsdata.com</A><BR>785-594-6807</DIV></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>