473,323 Members | 1,551 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.

Calendar Control question

Is it possible to create a calendar that shows previous input data and
also allows for input of new data?
Nov 13 '05 #1
8 2427
You would need to design this as a form to allow for adding new data..
Or else uyse a report for the previous input data and have a floating form
(pop-up) over the report to add new data....depending on how complicated the
info you are adding is this could work....

The form would allow for a 'click on a date box...add new info' approach.

HTH
Mal.
"Shyguy" <sh****@aol.com> wrote in message
news:1f********************************@4ax.com...
Is it possible to create a calendar that shows previous input data and
also allows for input of new data?

Nov 13 '05 #2
Hi,

Assuming that your Calendar *is* the default ActiveX one that ships with
Access...
and that the form that it is on is a bound form...
In this example the field that stores existing (or new) dates is named
"HoliDate".
The Calendar control is named "MyCalendar"

**********************************
Private Sub Form_Current()

Dim MyDate
MyDate = Me![Holidate]

Dim Msg As String
Msg = ""

Dim CR As String
CR = vbCrLf

If IsNull(MyDate) Then

Msg = Msg & "The current record does not contain a date ... " & CR & CR
Msg = Msg & "The current date will be inserted by default, " & CR
Msg = Msg & "but can be changed by selecting a date from the calendar."
MsgBox (Msg)
Me![MyCalendar].Value = Date
Me![Holidate] = Date

End If
End Sub

Private Sub MyCalendar_AfterUpdate()
'Yes, the AfterUpdate event can be used with an ActiveX calendar
'even though it is not included in the control's Property Sheet for reasons
unknown???

Me![Holidate] = Me![MyCalendar]
End Sub

**********************************

--
HTH,
Don
=============================
E-Mail (if you must)
My*****@Telus.net

Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)

I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.

================================

"Shyguy" <sh****@aol.com> wrote in message
news:1f********************************@4ax.com...
Is it possible to create a calendar that shows previous input data and
also allows for input of new data?

Nov 13 '05 #3
Thanks for the response. What I want to do is display a calendar on
the screen that would allow user to click in a days "box" and input
data. The "box" would also need to display any previously input data
when the calendar is opened. It would have to except 2 or 3 inputs
per date. I'm starting to think that this is not possible. ;-(
On Fri, 09 Jul 2004 02:16:24 GMT, "Don Leverton"
<le****************@telusplanet.net> wrote:
Hi,

Assuming that your Calendar *is* the default ActiveX one that ships with
Access...
and that the form that it is on is a bound form...
In this example the field that stores existing (or new) dates is named
"HoliDate".
The Calendar control is named "MyCalendar"

**********************************
Private Sub Form_Current()

Dim MyDate
MyDate = Me![Holidate]

Dim Msg As String
Msg = ""

Dim CR As String
CR = vbCrLf

If IsNull(MyDate) Then

Msg = Msg & "The current record does not contain a date ... " & CR & CR
Msg = Msg & "The current date will be inserted by default, " & CR
Msg = Msg & "but can be changed by selecting a date from the calendar."
MsgBox (Msg)
Me![MyCalendar].Value = Date
Me![Holidate] = Date

End If
End Sub

Private Sub MyCalendar_AfterUpdate()
'Yes, the AfterUpdate event can be used with an ActiveX calendar
'even though it is not included in the control's Property Sheet for reasons
unknown???

Me![Holidate] = Me![MyCalendar]
End Sub

**********************************


Nov 13 '05 #4
Shyguy <sh****@aol.com> wrote in message news:<36********************************@4ax.com>. ..
Thanks for the response. What I want to do is display a calendar on
the screen that would allow user to click in a days "box" and input
data. The "box" would also need to display any previously input data
when the calendar is opened. It would have to except 2 or 3 inputs
per date. I'm starting to think that this is not possible. ;-(

If you're trying to create something like an Outlook appointment
calendar, maybe this would work...

Use the calendar form from the Developer Handbook, and write the
selected date to a table. then you could prompt for more information
and update the record. (or just write to the table after you have all
the info you want.)
Nov 13 '05 #5
Hi,

This is beginning to sound like a PIM...???
Do you have MS Outlook?
If so, use that instead of Access.

Don

"Shyguy" <sh****@aol.com> wrote in message
news:36********************************@4ax.com...
Thanks for the response. What I want to do is display a calendar on
the screen that would allow user to click in a days "box" and input
data. The "box" would also need to display any previously input data
when the calendar is opened. It would have to except 2 or 3 inputs
per date. I'm starting to think that this is not possible. ;-(
On Fri, 09 Jul 2004 02:16:24 GMT, "Don Leverton"
<le****************@telusplanet.net> wrote:
Hi,

Assuming that your Calendar *is* the default ActiveX one that ships with
Access...
and that the form that it is on is a bound form...
In this example the field that stores existing (or new) dates is named
"HoliDate".
The Calendar control is named "MyCalendar"

**********************************
Private Sub Form_Current()

Dim MyDate
MyDate = Me![Holidate]

Dim Msg As String
Msg = ""

Dim CR As String
CR = vbCrLf

If IsNull(MyDate) Then

Msg = Msg & "The current record does not contain a date ... " & CR & CR Msg = Msg & "The current date will be inserted by default, " & CR
Msg = Msg & "but can be changed by selecting a date from the calendar." MsgBox (Msg)
Me![MyCalendar].Value = Date
Me![Holidate] = Date

End If
End Sub

Private Sub MyCalendar_AfterUpdate()
'Yes, the AfterUpdate event can be used with an ActiveX calendar
'even though it is not included in the control's Property Sheet for reasonsunknown???

Me![Holidate] = Me![MyCalendar]
End Sub

**********************************

Nov 13 '05 #6
Thanks for the reply. Unfortunately I don't have the Developer
Handbook. Is the calendar available online by any chance?
On 9 Jul 2004 17:06:37 -0700, pi********@hotmail.com (Pieter Linden)
wrote:
Shyguy <sh****@aol.com> wrote in message news:<36********************************@4ax.com>. ..
Thanks for the response. What I want to do is display a calendar on
the screen that would allow user to click in a days "box" and input
data. The "box" would also need to display any previously input data
when the calendar is opened. It would have to except 2 or 3 inputs
per date. I'm starting to think that this is not possible. ;-(

If you're trying to create something like an Outlook appointment
calendar, maybe this would work...

Use the calendar form from the Developer Handbook, and write the
selected date to a table. then you could prompt for more information
and update the record. (or just write to the table after you have all
the info you want.)


Nov 13 '05 #7
Hi,
No. Not a PIM. ;-) I am trying to write a database for a Non Profit
Group that performs at churches. The database keeps track of all the
information related to the group, and the churches. Some days can
have two performances and some only one. Actually, I have everything
pretty much worked out, but the user needs to see if anything is
scheduled for any day so as not to double book. We can print out a
schedule and check that when making new inputs, but I thought it would
be smoother if it could be done on a calendar type form.

On Sat, 10 Jul 2004 00:11:50 GMT, "Don Leverton" <My*****@Telus.Net>
wrote:
Hi,

This is beginning to sound like a PIM...???
Do you have MS Outlook?
If so, use that instead of Access.

Don

"Shyguy" <sh****@aol.com> wrote in message
news:36********************************@4ax.com.. .
Thanks for the response. What I want to do is display a calendar on
the screen that would allow user to click in a days "box" and input
data. The "box" would also need to display any previously input data
when the calendar is opened. It would have to except 2 or 3 inputs
per date. I'm starting to think that this is not possible. ;-(
On Fri, 09 Jul 2004 02:16:24 GMT, "Don Leverton"
<le****************@telusplanet.net> wrote:
>Hi,
>
>Assuming that your Calendar *is* the default ActiveX one that ships with
>Access...
>and that the form that it is on is a bound form...
>In this example the field that stores existing (or new) dates is named
>"HoliDate".
>The Calendar control is named "MyCalendar"
>
>
>
>**********************************
>Private Sub Form_Current()
>
>Dim MyDate
>MyDate = Me![Holidate]
>
>Dim Msg As String
>Msg = ""
>
>Dim CR As String
>CR = vbCrLf
>
>If IsNull(MyDate) Then
>
> Msg = Msg & "The current record does not contain a date ... " & CR &CR > Msg = Msg & "The current date will be inserted by default, " & CR
> Msg = Msg & "but can be changed by selecting a date from thecalendar." > MsgBox (Msg)
> Me![MyCalendar].Value = Date
> Me![Holidate] = Date
>
>End If
>End Sub
>
>Private Sub MyCalendar_AfterUpdate()
>'Yes, the AfterUpdate event can be used with an ActiveX calendar
>'even though it is not included in the control's Property Sheet forreasons >unknown???
>
>Me![Holidate] = Me![MyCalendar]
>End Sub
>
>**********************************


Nov 13 '05 #8
Hi,

Ok then ... Using the analogy of the paper calendar that hangs in the
kitchen, the one that everyone scribbles their up-coming events on... is
that what you're talking about? If so, I don't know of any way to enter the
data directly into an Access "calendar type form" ... especially not
multiple entries.

I was quite serious about suggesting the use of a PIM.

The "monthy view" of the Outlook calendar displays a frame for each day.
Several events (5) will fit into the frame directly. Let's say that I typed
in "Don's Birthday" into one of the 5 event containers. Double-clicking on
that displays a window that has a large memo area that could contain the
detailed plan for that event. The Outlook calendar has a few other "bonus"
features, such as reminders and recurring events.If all of this this really
is not sufficient, then perhaps someone who knows more about integration
between Outlook and Access than I do could suggest something that may
satisfy your requirements???

Barring that, or if you insist on using Access only ... I do think that you
might be able to do something "workable" using 2 related tables and a
mainform/subform approach..

"tblAppointmentDates"
DateID - AutoNumber - PK
ApptDate - Date - Default Value = Date(), perhaps?
.... other fields

"tblAppointmentDetails"
ApptID -AutoNumber - PK
DateID - Long Integer - FK
ApptDate - Date
ApptMemo - Memo
.... other fields

Define a One-to-Many relationship between the 2 tables

Create the main form "frmAppointmentDates" (based on tblAppointmentDates)
Add the Calendar Control, and paste in my code posted previously.(You'll
have to modify the field names to match.)

Add a datasheet-style subform "sbfApptDetails" (based on
tblAppointmentDetails)
LinkMaster : DateID; ApptDate
LinkChild: DateID; ApptDate

It's best (IMHO) that you use datasheet-style for the subform, because you
want to be able to display as many Appointment records as possible.
You could create another single-record form also based on
tblAppointmentDetails "dlgAppointmentDetails" which would allow the user to
view all of the data in greater detail ... the memo field in particular.
This form could be "called" from the datasheet-style subform using
LinkCriteria, by say ... double-clicking in the ApptID field, like this:
**************************************
Private Sub ApptID_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "dlgAppointmentDetails"

stLinkCriteria = "[ApptID]=" & Me![ApptID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub
**************************************
When you get this done, you should be able to click on a date on the
calendar to set the date on the main form. You will then be able to enter
and/or view existing appointment details in the subform. The
LinkMaster/LinkChild links will force the entry for ApptDate automatically,
in new records, as soon as data is entered in any other field.

The user could then "preview" the appointment in "sbfApptDetails", double
click on the desired "ApptID", and finally view all of the details in
"dlgAppointmentDetails". A few more steps, granted, than the average PIM,
but as I said before ... "workable"???

Don

"Shyguy" <sh****@aol.com> wrote in message
news:ma********************************@4ax.com...
Hi,
No. Not a PIM. ;-) I am trying to write a database for a Non Profit
Group that performs at churches. The database keeps track of all the
information related to the group, and the churches. Some days can
have two performances and some only one. Actually, I have everything
pretty much worked out, but the user needs to see if anything is
scheduled for any day so as not to double book. We can print out a
schedule and check that when making new inputs, but I thought it would
be smoother if it could be done on a calendar type form.

Nov 13 '05 #9

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

Similar topics

0
by: Tim Graichen | last post by:
Hello, I am making use of the Active X calendar control (mscal.Calendar.7) in several places in my main form, with the following code Below is an example of the code I'm using for the...
5
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background...
1
by: Frank Bishop | last post by:
I have a user control that will open and close the calendar control when the user clicks on an anchor tag. Instead of having the user remember to close the calendar after they make a day selection,...
1
by: Peter | last post by:
I have a dilemna. Currently I have created a custom calendar webcontrol that a user can select and will dump the date along with some specialized information set in the tooltip. It actually is...
2
by: serge calderara | last post by:
Dear all, I have a webform with a calendar control on it. When loaded the calendar is set to the current date. Depending on a criteria from a database field, calendar day cell appears with red...
3
by: Peter | last post by:
Is there anyway to make the System.Web.UI.WebControls.Calendar to display only Month Name and Year, like: January, 2006 February, 2006 ..... .... .... ....
1
by: ajmera.puneet | last post by:
If I have Calendar Control on Asp.net page and I have a table for Fiscal years on sql server then, How can I check the dates from table to Calendar Control,so that I can format the Calendar...
2
by: Paul | last post by:
I am using the standard Calendar control in ASP.Net 2.0 and VB.Net and VS2005. Here is the code: <asp:calendar id="cldr_contract_date" runat="server" backcolor="#ffffff" width="250px"...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.