Can I use Suite Pro with Access VBA? |
Post Reply |
Author | |
Access2007
Groupie Joined: 21 April 2009 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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. |
|
Access2007
Groupie Joined: 21 April 2009 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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 |
|
Access2007
Groupie Joined: 21 April 2009 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
The calendar access sample answers all those questions, I suggest playing with the sample.
|
|
Access2007
Groupie Joined: 21 April 2009 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
That is simple, use the "Built-In" captionbar as mentioned before (do not use the separate bar):
CalendarControl.ShowCaptionBar = True Or use: CalendarCaptionBar.AttachToCalendar |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |