Building a agenda

MarcD

New member
Local time
Today, 10:41
Joined
Apr 30, 2005
Messages
6
Hello,

I want to build a agenda, like the one shown in the image below.
I have no idea how to start.

Any help would be greatly appreciated.

Thanks in advance

agenda.gif
 
Just tried this. Don't know about the pretty colors, but..

Create a table
Date as Date
Time as Text
Desc as Text

I loaded it with the following code
Public Sub LdTb5()

Dim db As Database
Dim rs As Recordset
Dim tm As String
Dim ctr As Integer

ctr = 0
Set db = CodeDb
Set rs = db.OpenRecordset("Table5")

Do While ctr <= 2345
tm = CStr(Format(ctr, "0000"))
rs.AddNew
rs!Date = Date
rs!Time = Left(tm, 2) & ":" & Right(tm, 2)
rs!Desc = " "
rs.Update
If Right(tm, 2) = "45" Then
ctr = ctr + 55
Else
ctr = ctr + 15
End If
Loop

rs.Close
Set rs = Nothing
db.Close
Set db = Nothing

End Sub

This loads the table with 15 minute intervals for today. Play with the date to get it to load several days, or declare an outer loop and run the whole thing until you reach however many days ahead you wish to create.

I then created the following crosstab query:

TRANSFORM First(Table5.desc) AS FirstOfdesc
SELECT Table5.time, First(Table5.desc) AS [Total Of desc]
FROM Table5
GROUP BY Table5.time
PIVOT Format([date],"Short Date");

This will give you a basic display such as you are looking for. Of course, since it is a crosstab, you can't update in the display.

For an updatable form, I would be tempted to go with an unbound form displaying 7 columns (1 week).
 
Thank you for your reply.
I have it working for just one date only, however, i am having trouble getting it to work for multiple days.

I am fairly new at Access.

Thank you in advance for any help you may offer
 
Change the field name in the table from Date to Dt or something else. Date is a reserved word and can cause problems when used as a variable
 
Heh, well, the date variable name isn't the problem.
I seriously have no clue what to change to make it display a week at a time,
Any help and suggestions would be appreciated.

Thanks in advance
 
Set the date range in a query feeding the crosstab query.
 

Users who are viewing this thread

Back
Top Bottom