473,806 Members | 2,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(Startda te+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 2714
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_AfterInser t()
Dim dtWhen As Date

With Me.RecordsetClo ne
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**********@h otmail.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(Startda te+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
2066
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 for your help, Marco
1
1649
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. So..for example... John Smith 01/01/04 Jane Doe 01/15/04 Joe Blow 01/17/04 then have a calendar on a form for the month of January and in the box
8
2462
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
8235
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 able to click on a date, where the chosen date will then be used as the criteria for the control source of the calendar. What do I need to do to make the calendar active?? I can physically get it on my form, and specify the criteria in my...
16
3064
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 the code, but can't determine what to alter. Very nice piece of work, by the way. Thanks
3
2770
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 get an error on this line as it looks for the query. Here's the first piece of the code where I'm able to get display calendar and the input boxes. Just trying to write back to database. Thanks in advance. Public Sub Page_Load(ByVal Sender...
9
5824
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. I can see all "dates" moving to next records, but one per calendar. :-( Ex: 17/06 on one claendar, then if i click on next record, I can see my calendar with 24/06 ...etc ...
1
9678
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. I've seen mentions of this issue in other forums, but haven't found an ansewer (at least one I understand lol) in other postings. I have a text box that users need to input a short date into. I tried using a Access's built in calendar control...
1
3006
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 was told about calendar control fundtion and created a calendar in a form but cannot work out how to call on the data within the tables so it appears as an entry in the calendar when the calendar is opened. Please can you give me some advice on...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10623
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10373
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.