Calendar

  • Thread starter Thread starter Mike Langensiepen
  • Start date Start date
M

Mike Langensiepen

I have a Kitchen Sales application that stores various date categories -
measure date, delivery date, install date etc. Does anyone know of a
calendar application that will scan through the database and display a
calendar for a specific month with all the events shown?

Thanks

Mike
 
Thanks for this Duane, are there any notes on the use of it?

Also I was hoping for more of an Outlook style month at a glance with colour
coding of the entries
 
How is the "Calendar Style Schedule" different from the Outlook style month
at a glance? You can add code or conditional formatting to change colors of
entries.
 
About the only code to run the calendar style report draws lines between the
days to match the height of the tallest day subreport. If you don't want to
draw lines between the day subreports, you can comment out all of this code.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim lngHeight As Long 'store the height of tallest control
Dim i As Integer
Dim lngLeft As Long
For i = 1 To 5
'compare heights
If Me("srpt" & i).Height > lngHeight Then
lngHeight = Me("srpt" & i).Height
End If
Next
'add the height of other control
lngHeight = lngHeight + Me.txtDay1.Height
'draw the lines
'Me.DrawWidth = 28
For i = 0 To 5
lngLeft = i * Me.srpt1.Width
Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
Next
End Sub
 
In your eyes is it better for me to have all dates stored in a separate
table to make it easier for reporting? I have normalised some of the
database (thanks to Albert Kallal there) but did not consider it for the
dates as initially there were only 3 or 4 date fields used. Now there are
about 10
 
I would not probably not have "various date categories" as fields. You could
normalize your dates using a union query. Then use the union query as the
record sources for the subreport and main report.
===quniDates========
SELECT [PKFieldName], [measure date] as TheDate, "Measure" as DateCategory
FROM tblYourTable
WHERE [Measure date] is Not Null
UNION ALL
SELECT [PKFieldName], [delivery date], "delivery "
FROM tblYourTable
WHERE [delivery date] is Not Null
UNION ALL
SELECT [PKFieldName], [install date], "install"
FROM tblYourTable
WHERE [install date] is Not Null;

Use this query as the record source rather than your "wide" table with
multiple date fields.
 
Sorry if I sound like a tyro (but I am!). So as I understand it you WOULD
keep the separate date fields in the main table but use the Union query to
give a complete date list for a calendar report?

Or would I keep a separate table or tables of dates?

If I have a separate single table of dates e.g. clientid, date, datetype
(installer, electrician etc), how do I force the date type from a field on
the form?

Or I am I making this overcomplex or oversimple? lol



Duane Hookom said:
I would not probably not have "various date categories" as fields. You
could normalize your dates using a union query. Then use the union query as
the record sources for the subreport and main report.
===quniDates========
SELECT [PKFieldName], [measure date] as TheDate, "Measure" as DateCategory
FROM tblYourTable
WHERE [Measure date] is Not Null
UNION ALL
SELECT [PKFieldName], [delivery date], "delivery "
FROM tblYourTable
WHERE [delivery date] is Not Null
UNION ALL
SELECT [PKFieldName], [install date], "install"
FROM tblYourTable
WHERE [install date] is Not Null;

Use this query as the record source rather than your "wide" table with
multiple date fields.

--
Duane Hookom
MS Access MVP

Mike Lang said:
In your eyes is it better for me to have all dates stored in a separate
table to make it easier for reporting? I have normalised some of the
database (thanks to Albert Kallal there) but did not consider it for the
dates as initially there were only 3 or 4 date fields used. Now there are
about 10
 
If this were my mdb, I would normalize the tables to remove the multiple
date fields after appending the dates into a normalized structure where
Installer, Electrician, etc become values in a field.

If you can't or don't want to take the time to normalize, you might get by
with the union query.

--
Duane Hookom
MS Access MVP

Mike Lang said:
Sorry if I sound like a tyro (but I am!). So as I understand it you WOULD
keep the separate date fields in the main table but use the Union query to
give a complete date list for a calendar report?

Or would I keep a separate table or tables of dates?

If I have a separate single table of dates e.g. clientid, date, datetype
(installer, electrician etc), how do I force the date type from a field on
the form?

Or I am I making this overcomplex or oversimple? lol



Duane Hookom said:
I would not probably not have "various date categories" as fields. You
could normalize your dates using a union query. Then use the union query
as the record sources for the subreport and main report.
===quniDates========
SELECT [PKFieldName], [measure date] as TheDate, "Measure" as
DateCategory
FROM tblYourTable
WHERE [Measure date] is Not Null
UNION ALL
SELECT [PKFieldName], [delivery date], "delivery "
FROM tblYourTable
WHERE [delivery date] is Not Null
UNION ALL
SELECT [PKFieldName], [install date], "install"
FROM tblYourTable
WHERE [install date] is Not Null;

Use this query as the record source rather than your "wide" table with
multiple date fields.

--
Duane Hookom
MS Access MVP

Mike Lang said:
In your eyes is it better for me to have all dates stored in a separate
table to make it easier for reporting? I have normalised some of the
database (thanks to Albert Kallal there) but did not consider it for the
dates as initially there were only 3 or 4 date fields used. Now there
are about 10


"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
About the only code to run the calendar style report draws lines
between the days to match the height of the tallest day subreport. If
you don't want to draw lines between the day subreports, you can
comment out all of this code.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim lngHeight As Long 'store the height of tallest control
Dim i As Integer
Dim lngLeft As Long
For i = 1 To 5
'compare heights
If Me("srpt" & i).Height > lngHeight Then
lngHeight = Me("srpt" & i).Height
End If
Next
'add the height of other control
lngHeight = lngHeight + Me.txtDay1.Height
'draw the lines
'Me.DrawWidth = 28
For i = 0 To 5
lngLeft = i * Me.srpt1.Width
Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
Next
End Sub

--
Duane Hookom
MS Access MVP


You might be able to but my coding abilities fall far short of this
level!


"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
How is the "Calendar Style Schedule" different from the Outlook style
month at a glance? You can add code or conditional formatting to
change colors of entries.

--
Duane Hookom
MS Access MVP

Thanks for this Duane, are there any notes on the use of it?

Also I was hoping for more of an Outlook style month at a glance
with colour coding of the entries


"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
There are a number of sample calendar style reports in the download
at http://www.access.hookom.net/Samples.htm.

--
Duane Hookom
MS Access MVP

I have a Kitchen Sales application that stores various date
categories - measure date, delivery date, install date etc. Does
anyone know of a calendar application that will scan through the
database and display a calendar for a specific month with all the
events shown?

Thanks

Mike
 
Thanks for the help Duane

Duane Hookom said:
If this were my mdb, I would normalize the tables to remove the multiple
date fields after appending the dates into a normalized structure where
Installer, Electrician, etc become values in a field.

If you can't or don't want to take the time to normalize, you might get by
with the union query.

--
Duane Hookom
MS Access MVP

Mike Lang said:
Sorry if I sound like a tyro (but I am!). So as I understand it you WOULD
keep the separate date fields in the main table but use the Union query
to give a complete date list for a calendar report?

Or would I keep a separate table or tables of dates?

If I have a separate single table of dates e.g. clientid, date, datetype
(installer, electrician etc), how do I force the date type from a field
on the form?

Or I am I making this overcomplex or oversimple? lol



Duane Hookom said:
I would not probably not have "various date categories" as fields. You
could normalize your dates using a union query. Then use the union query
as the record sources for the subreport and main report.
===quniDates========
SELECT [PKFieldName], [measure date] as TheDate, "Measure" as
DateCategory
FROM tblYourTable
WHERE [Measure date] is Not Null
UNION ALL
SELECT [PKFieldName], [delivery date], "delivery "
FROM tblYourTable
WHERE [delivery date] is Not Null
UNION ALL
SELECT [PKFieldName], [install date], "install"
FROM tblYourTable
WHERE [install date] is Not Null;

Use this query as the record source rather than your "wide" table with
multiple date fields.

--
Duane Hookom
MS Access MVP

In your eyes is it better for me to have all dates stored in a separate
table to make it easier for reporting? I have normalised some of the
database (thanks to Albert Kallal there) but did not consider it for
the dates as initially there were only 3 or 4 date fields used. Now
there are about 10


"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
About the only code to run the calendar style report draws lines
between the days to match the height of the tallest day subreport. If
you don't want to draw lines between the day subreports, you can
comment out all of this code.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim lngHeight As Long 'store the height of tallest control
Dim i As Integer
Dim lngLeft As Long
For i = 1 To 5
'compare heights
If Me("srpt" & i).Height > lngHeight Then
lngHeight = Me("srpt" & i).Height
End If
Next
'add the height of other control
lngHeight = lngHeight + Me.txtDay1.Height
'draw the lines
'Me.DrawWidth = 28
For i = 0 To 5
lngLeft = i * Me.srpt1.Width
Me.Line (lngLeft, 0)-(lngLeft, lngHeight)
Next
End Sub

--
Duane Hookom
MS Access MVP


You might be able to but my coding abilities fall far short of this
level!


"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
How is the "Calendar Style Schedule" different from the Outlook
style month at a glance? You can add code or conditional formatting
to change colors of entries.

--
Duane Hookom
MS Access MVP

Thanks for this Duane, are there any notes on the use of it?

Also I was hoping for more of an Outlook style month at a glance
with colour coding of the entries


"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
There are a number of sample calendar style reports in the
download at http://www.access.hookom.net/Samples.htm.

--
Duane Hookom
MS Access MVP

I have a Kitchen Sales application that stores various date
categories - measure date, delivery date, install date etc. Does
anyone know of a calendar application that will scan through the
database and display a calendar for a specific month with all the
events shown?

Thanks

Mike
 
Back
Top