Print Page | Close Window

Can I use Suite Pro with Access VBA?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=14092
Printed Date: 25 September 2024 at 8:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can I use Suite Pro with Access VBA?
Posted By: Access2007
Subject: Can I use Suite Pro with Access VBA?
Date Posted: 21 April 2009 at 10:26am
Hi, I use Access 2007 with VBA. I'd like to incorporate the calendar into one of my applications. Is this possible?
I downloaded the sample applications, and when I try to open the access sample (Ribbonsample), I get an error message "There is no object in this control" and then the VBA error message
"Runtime error 438. Object doesn't support this property or method" which comes as a result of the loadicons() sub. In the calendar sample, I get the same
error message.
Do I have to use Visual Studio to use Suite Pro, or will it work with just Access?
If so, what do I need to do to set it up so that it will work?
thanks for your help.




-------------
Windows 7 Pro 64
Access 2007
Calendar 15.3.1



Replies:
Posted By: SuperMario
Date Posted: 21 April 2009 at 10:39am
Yes, it will work with access.

Simply delete the control from the form and re-add it, make sure the to name the new control the same as the old.


Posted By: Access2007
Date Posted: 21 April 2009 at 12:06pm
Thank you. Yes that got the sample working.  Now I'm trying to locate the instructions that would guide me into setting up some basic actions in a new database:

1. I notice that in your Access sample calendar, on the frmCalendar, there are 4 buttons on the top left with the numbers 1, 5, 7 and 31 on them that have the onclick event assigned in Access to change the view of the calendar.  Is this because the CalendarCaptionBar Control won't work in Access? If it does work, how do I assign the onclick events to the CalendarCaptionBar Control?

2. In the sample Access calendar, the Events table holds the basic information for the calendar. In my own application, does my Events table have to have the exact same fields as the one in the sample, with the exact same names?  Can any be added? For example if I wanted to add the customerID of the person that the appointment was with, so that I could add this to the calendar appt, and then double click the calendar on that appointment to take me to the record for the customer the appointment was with? So in addition to adding additional fields to the event table, and the calendar, can I create doubleclick events in Access?

3. If I wanted to show multiple people's appointments on the calendar, which field/table would I put this in the Database?

Sorry for all the questions, I've never used Active X controls before in Access. If you've got data available online that answers my questions, please let me know.   Thank you!




-------------
Windows 7 Pro 64
Access 2007
Calendar 15.3.1


Posted By: SuperMario
Date Posted: 21 April 2009 at 12:47pm
1. It is because the sample was made before the captionbar existed.  Use the built in captionbar for ease of use.
2. You must keep the tables the same, however you can add custom properties to the events to hold whatever information you want.
http://forum.codejock.com/forum_posts.asp?TID=11985&KW=customproperties

3. http://forum.codejock.com/forum_posts.asp?TID=3989&KW=multi-schedule


Posted By: Access2007
Date Posted: 22 April 2009 at 11:17am
Thank you for these links, but they didn't fully answer my question.
So I created a new access database, I imported the tables from the sample calendar access database.
I created a new form, added calendar control (renamed it to calendarcontrol1) and the calendar caption bar control.
Now, how do I get the controls to function?
1. When I click the  day, week, or month on the calendar caption bar, nothing happens to the calender view. How do I set this up so it works?
2. When I click a date on the calendar, it locks up. How do I get it to open the frmEditEvent?
Thanks


-------------
Windows 7 Pro 64
Access 2007
Calendar 15.3.1


Posted By: SuperMario
Date Posted: 22 April 2009 at 11:34am
The calendar access sample answers all those questions, I suggest playing with the sample.


Posted By: Access2007
Date Posted: 22 April 2009 at 12:17pm
Thanks, but that doesn't help me. The Sample doesn't have the calendarcaptionbar.
All I want to know is how to get the calendarcaptionbar to effect the calendar.



-------------
Windows 7 Pro 64
Access 2007
Calendar 15.3.1


Posted By: SuperMario
Date Posted: 22 April 2009 at 12:32pm
That is simple, use the "Built-In" captionbar as mentioned before (do not use the separate bar):

CalendarControl.ShowCaptionBar = True

Or use:
CalendarCaptionBar.AttachToCalendar



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