473,323 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Produce some kind of calendar in Access?

I am byuilding this database which (among others things) will have to
produce a kind of calendar.

Users give in the appointments they have and how long they take.
F.e: John Doe is attending a conference which will take three days. This
conference starts on 12-07-2004

So the user would give in

a) Name John Doe (selectable from a list,
already done that)
b) Kind of appointment Conference (selectable from a list, already
done that)
c) Startdate 12-07-2004 Date/Time field
d) Howlong 3 Numeric field

Now it is very simple to calculate the Enddate(Startdate+HowLong-1)
I know how to convince Access2K to fill in an Excelsheet That John Doe is
attending a conference starting 12-07-2004. I can also see that very clearly
and easily in the Excelsheet I produce. But I need it to fill it in also for
the days 13-07 and 14-07. In fact, it needs to fill in all the dates
starting with the Startdate, ending with the enddate.

How do I do this? I am pretty worthless if it comes up to code so I would
prefer it to be done in a query of some sort but, to be honest, I am pretty
desperate now so I would even be prepared to hammer it in as they did in the
Stone-age :-p as long as I find a solution for this problem!

I sincerely hope that someone can help me!

TIA,

Henro
Nov 12 '05 #1
1 2690
So you need to create additional records in the same table?

This code is a quick demo of how to create an appointment for each
additional day after the StartDate, at the time the record is saved in the
form. It does not handle deleting all or part of the appointment, or
modifying a date. (It may actually be better to use an unbound form to add
the appointment for all days, including the original. To do that you would
OpenRecordset on the table.)

Private Sub Form_AfterInsert()
Dim dtWhen As Date

With Me.RecordsetClone
For dtWhen = Me.StartDate + 1 To Me.StartDate + Me.HowLong
.AddNew
!Name = Me![Name]
![Kind of Appointment] = Me![Kind of Appointment]
!StartDate = dtWhen
.Update
Next
End With
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Henro V" <ma**********@hotmail.com> wrote in message
news:bp**********@news4.tilbu1.nb.home.nl...
I am byuilding this database which (among others things) will have to
produce a kind of calendar.

Users give in the appointments they have and how long they take.
F.e: John Doe is attending a conference which will take three days. This
conference starts on 12-07-2004

So the user would give in

a) Name John Doe (selectable from a list, already done that)
b) Kind of appointment Conference (selectable from a list, already done that)
c) Startdate 12-07-2004 Date/Time field
d) Howlong 3 Numeric field

Now it is very simple to calculate the Enddate(Startdate+HowLong-1)
I know how to convince Access2K to fill in an Excelsheet That John Doe is
attending a conference starting 12-07-2004. I can also see that very clearly and easily in the Excelsheet I produce. But I need it to fill it in also for the days 13-07 and 14-07. In fact, it needs to fill in all the dates
starting with the Startdate, ending with the enddate.

How do I do this? I am pretty worthless if it comes up to code so I would
prefer it to be done in a query of some sort but, to be honest, I am pretty desperate now so I would even be prepared to hammer it in as they did in the Stone-age :-p as long as I find a solution for this problem!

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marco Simone | last post by:
Hi, If someone can answer how to add calendar control on form, where you can choose date. I think there is Calendar control in ActiveX add in, but I don't know how to implement it. Thanks...
1
by: Charles | last post by:
I have a query in access 97 that pulls names and associates those names with dates. I'd like to have a calendar function that would simply display the names under the correct date listed. ...
8
by: Shyguy | last post by:
Is it possible to create a calendar that shows previous input data and also allows for input of new data?
3
by: Matthew | last post by:
I currently have a form in MS Access that has certain combo boxes which specify criteria in order to run a query based on that criteria. I want to add to this, a calendar from which a user will be...
16
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through...
3
by: Hutty | last post by:
I'm trying create a calendar control that updates an access database with events. I have some code I managed to piece together. First error I'm running into is the Mycommand.ExecuteNonQuery(). I...
9
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar....
1
by: afr0ninja | last post by:
Hello all, and thank you in advance for your assistance. I'm pretty new to access and I'm trying to teach myself some VBA by using various bits of code I find here and there mixed with my own....
1
by: xian2 | last post by:
Hi, I wanted to create a calendar in Access that would call on data stored within tables in the database (dates in forms) and would show it visually on a calendar when the calendar was opened. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.