Print Page | Close Window

MS Access

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=4649
Printed Date: 28 June 2024 at 6:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: MS Access
Posted By: moe188
Subject: MS Access
Date Posted: 24 July 2006 at 4:16pm
Cry
Hi,
I checked the calendar sample (using ms access database), but I did not quite understand it (I am newEmbarrassed).
So, some help here:
1- how to connect the calendar control to database (db1.mdb)?
2- how to retrieve the data from a recordset (rstAppointment) for today's date or any date selected by the user.?
3- how can I display the result for the the different type of view (week view, workweek view, month view), do I have to use code to do so, or it will be built in?
4- how can I save a new data entered by the user to the rstAppointment?
Thank you,
 



Replies:
Posted By: sserge
Date Posted: 30 July 2006 at 6:20pm
Hi,

1. As you can see in this sample, when loading a form, you connect CalendarControl with the MDB file itself:

Me.CalendarControl1.SetDataProvider Application.ADOConnectString
Me.CalendarControl1.DataProvider.Open

Then Calendar uses internal functionality to access tables with data.

2. Using Calendar's functionality:

Dim Events As CalendarEvents
Set Events = CalendarControl.DataProvider.RetrieveDayEvents(YourDate)


3. You can switch views programmatically like:

Me.CalendarControl1.ViewType = xtpCalendarWeekView

In the sample views are shown as a set of buttons, clicking runs a code above.

4. Data will be saved automatically to the appropriate tabe (Table Event for appointments).

Hope this helps.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net