473,473 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Broken Calendar Control in MS Access 2007 - How can extra methods and attributes be a

4 New Member
I have inherited an Access Database that seems to work in Access 2003 and earlier but not in 2007 and later, and the issue is around a custom-built calendar control which appears to be similar to the existing MS calendar control but with some extra methods added such as "cal.ISOWeek", "cal.ISODay", based on ISO calendar system. There is no documentation for this control, and I've no idea who created it - probably long since left the company.
Is there any way of adding methods to a calendar control in Access 2007 that would allow me to get similar functionality?
Sep 26 '13 #1
6 2395
zmbd
5,501 Recognized Expert Moderator Expert
SurgeArrester
Well, the answer is both yes and no...
We don't know what your custom functions do; however, you might take a look at the following and see if it helps:
Replacing the Calendar Control in Access 2010 Applications
I realize the link is for 2010; however, this should also work for 2007, if not, you know where to come for help (^.-)

z
Sep 26 '13 #2
SurgeArrester
4 New Member
Thanks zmbd - I had seen some of those microsoft suggestions, but figured I'd ask on a forum such as this too!

As far as I can see, there are some extra attributes assigned to the calendar object - for instance it will return the isoweek value based on the current date. ISO weeks sometimes start the last week of the previous year, or sometimes start two or three days into the new year. (Some years will have 53 ISO weeks, and other years have only 52 ISO weeks)
Thus in the vba scripts associated with the various forms in the db, one can see things like:
Expand|Select|Wrap|Line Numbers
  1. dim cal as object
  2. set cal = [Forms]![Calendar]!Calendar_XXXX
  3. cal.isoweek = 10
What I am interested in is if I create a new calendar in a form, and rename it so Calendar_XXXX, is there a way to add in attributes such as cal.isoweek which are either settable, or which default to the ISO week value based on the current date or the date in the calendar? Calculating the ISO week is easy enough - there's various algorithms to do it, but as a bit of an access / vba novice, I am more interested in the bit about the attributes and if there's a simple fix available.
Sep 27 '13 #3
zmbd
5,501 Recognized Expert Moderator Expert
(1) Modifying the built in controls is very much beyond both thus forum and the novice programmer. So the simple answer to the question is more than likely, no. Now ADezii, Rabbit, Neopa have a bit more experince about these things; thus they may have a solution to modify a built in control; however, I suspect not one that is easy.

(2) Let us take a look at your "custom control." Normally, I think we would need to start a new thread; however, for now, let's see if we can work thru the control you are having issues with:
(2a) You're working with a custom control or form. From the code you posted, it appears that there should be a form in the database called "calendar" and not an actual add-in control. This form is where you're going to have to dive into the code.
(i) Are you receiving any errors? IF so, then please post them exactly as given, title, number, and text. If the code takes you into the VBA editor in debug mode (the line where the error is suspected is by default selected and highlighted (usually in yellow)) then also post that section of code... a few lines before and after the suspected error AND indicate which line had the error. Please remember to select the posted code and format it using the [CODE/] button.

(ii) If you are not receiving an error, then in a few sentences, describe what is happening and that differs from the desired result.
Sep 27 '13 #4
SurgeArrester
4 New Member
When I start up the database in Access 2007, I get "run time error '438' - Object doesn't support this property or method".
The offending code is as follows:
Expand|Select|Wrap|Line Numbers
  1. Sub Main_Form_Issue()
  2. Dim cal As Object
  3. DoCmd.OpenForm "Calendar", , , , , acHidden
  4.  
  5. Set cal = [Forms]![Calendar]!CalendarESBNG
  6.  
  7.  
  8. If cal.ESBWeek < 10 Then
  9.     [Forms]![main form]![Data Issue] = "1.0" & cal.ESBWeek
  10. Else
  11.     [Forms]![main form]![Data Issue] = "1." & cal.ESBWeek
  12. End If
  13. [Forms]![main form]![Date] = cal.Day & "/" & cal.Month & "/" & cal.Year
  14.  
  15. DoCmd.Close acForm, "Calendar"
  16. End Sub
  17.  
The error is generated by the first cal.esbweek line (esbweek is the same as isoweek). The name of the calendar on the form is CalendarESBNG. What should happen is that a main form should open, presenting the user with various options around reporting, entering new data etc...fairly mundane stuff. (DB at link - change zap to zip)
Sep 27 '13 #5
zmbd
5,501 Recognized Expert Moderator Expert
Find either the form or the class module named "CalendarESBNG" in the database.
- The form should be visible in the navigation panel under the forms group ( ok, that's obvious; however, often the subgroups are collapsed so one doesn't always see them).
- If it's a class module, then you'll only see this in the VBA editor in the projects tree.

Once we locate that, then we can start finding out why the property of method "ESBWeek" isn't working.
Sep 28 '13 #6
SurgeArrester
4 New Member
There is a form called Calendar with a blank box where the calendar control should be! When you look at the properties, CalendarESBNG is an ActiveX control, which looks as if it was custom written, but is no longer being picked up by the database. The 'class' is ESBNGCalendar.ESBCalendar, rather than a more typical microsoft calendar class, which leads me to believe that whoever wrote the db modified or created their own activex calendar control. If you want to see for yourself, there's a link to the actual db in my previous msg. There aren't any class modules with code for the calendar functions or anything like that.
Hence it looks like the best way to fix this would be to insert a new standard calendar control and try to add in the functionality for 'isoweek' type things. Any thoughts?
Sep 28 '13 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: slawek xxxxx | last post by:
Hello everyone, I have a terrible with Calendar control and I hope someone of you can help me. The problem is following. I have to display a calendar to select date. I have prepared page with...
1
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....
5
by: rockdale | last post by:
Hi, I tried to search web for an non-popup calendar control, (like javascript calendar) but could not find a good solution. Most solutions are popup another window and show the calendar, then...
5
by: Ira Solomon | last post by:
Hi: Any quick opinions on Access 2007? Has anyone got this to coexist with Access 2003? Thanks Ira
49
by: Allen Browne | last post by:
If you are looking for opinon on what's useful in Access 2007, there's a new article at: http://allenbrowne.com/Access2007.html Covers what's good (useful features), what's mixed (good and bad),...
1
by: Eugene | last post by:
Hello All, I need a report in Access 2007 to show a dynamic image on every page. I have a table, and I store image's path in a cell in each of the rows. In 2003, I was able to do that using...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
4
by: wevans | last post by:
Hello all. I'm new to access and am trying to create a calendar/schedule in access. Yes I know there's a bunch of other ways and software to use, but I want to keep it together with the database I...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
32
by: newguytom | last post by:
What I am wanting to do is create layout drawings of a product that has modular components that can be configured in any configuration. Each image of a modular part is the same width with a variable...
0
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,...
0
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...
1
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...
0
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.