Solved

ActiveX Calendar control for Access 2003

Posted on 2010-11-30
10
473 Views
Last Modified: 2012-05-10
One of my new clients it getting a rather strange issue using the AcitveX calendar control (within an Access 2003 database).  I have the control embedded into a form, for scheduling call-backs etc.  However, this client is having issues where they set the required call-back date (on the ActiveX control), but it ends up storing the value as today’s date.  This is an intermittent issue, which none of my other clients have seen/reported in the seven years that it has been shipped (around 1000 units to date on over 20 different sites).  

I've taken a look at the code over the past couple of weeks (which is basic to say the least), I've added delays, DoEvents, Refresh etc - but the problem has still not been resolved. My next port of call (after this), is possibly to get a Third party calendar (something like eXCalendar by eXontrol).

Has anyone ever seen this/similar issue, or have any useful suggestions - I really need to get it resolved (even if it isn't our software).

Thanks as always
0
Comment
Question by:Andy Brown
  • 5
  • 4
10 Comments
 
LVL 9

Expert Comment

by:Ramanhp
ID: 34237761
plz refer http://office.microsoft.com/en-us/access-help/using-the-calendar-control-in-access-HP001121060.aspx

important:

i hope action required in the code is:

Get the date that is currently selected in the calendar >>         dtCriteria1 = StartDateCalendar.Value
0
 

Author Comment

by:Andy Brown
ID: 34237785
Thanks Ramanhp - We are certainly using the .Value part (have been for over seven years) and as mentioned the code is very basic stuff.

Thanks again.
0
 
LVL 84
ID: 34237959
I think you'd be much better off implementing a different method to manage this. While the Calendar control is normally pretty well behaved, you're going to run into trouble (especially as your users move to the newer platforms)

I've always used the API calls from Stephen Lebans (http://www.lebans.com/monthcalendar.htm) but there are several other methods available:

http://www.granite.ab.ca/access/calendars.htm
0
 

Author Comment

by:Andy Brown
ID: 34238146
Thanks LSM - appreciated as always.

The main issue (and the reason I was looking at the XCalendar), is that it needs to appear within a form and the layout needs to look the same (otherwise it will cause user-issues / support calls etc).
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 34238524
The link I provided shows several form-based Calendars. You could build the form and embed that as as Subform if needed.

Unfortunately, using ActiveX controls in Access is always an iffy prospect. Using a control that is NOT verified to work in Access is simply trading one set of troubles for another. It looks as is eXcontrol has verified that their controls work in Access, but I'd verify that it works in the newer versions as well. Also, anytime I see a statement like "don't call us for technical support" I wonder exactly what sort of company I'm dealing with :)

If you can show the code where you actually set the value (when the user interacts with the ActiveX calendar) then maybe we can spot something.

What OS is the client running? What version of Access?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Andy Brown
ID: 34238666
The code is quite literally as below.

When you click on the ActiveX control it then changes the date and updates the datGlobal variable.  After the users checks have been run - it uses this variable to update the Call-back date.  Very basic stuff (and it's worked everywhere else).

Various OS from XP to Win7.
DoCmd.OpenForm "Calendar - Schedule activity", acNormal, , , acFormPropertySettings, acWindowNormal

Set frmCal = Forms![Calendar - Schedule activity]

datGolbal=Date() + 1

frmCal.Form.Controls![ctlCalendar].Value = datGlobal

Open in new window

0
 
LVL 84
ID: 34238881
You have a misspelling:

datGolbal = Date() + 1

and you then refer to the variable named "datGlobal"

This may be a typo here on EE, but if this was a direct copy/paste from your project then you should fix that.

Also, when working with Dates, you should use the various Date functions. For example:

datGlobal = DateAdd("d", 1, Date())

I know that many of the Experts here on EE use the syntax you're showing, but it's not the right way to do things.

Finally:

Does your ActiveX control reside directly on the "Calendar - Schedule activity" form? If so, you don't need to refer to the Form:

frmCal.Form.Controls![ctlCalendar].Value

You should refer to it in this manner:

frmCal.Controls("ctlCalendar").Value

0
 
LVL 84
ID: 34238896
Another concerning issue with ActiveX controls:

"Various OS from XP to Win7."

Many ActiveX (i.e. Com) controls that work fine on XP will fail on Win7, especially as your clients move to 64-bit versions. Be aware of this, and start taking steps now to reduce your dependency on ActiveX controls (or move to a different platform, like .NET).
0
 

Author Comment

by:Andy Brown
ID: 34239168
It was a typo at my end (but well spotted).  I'll take a look at the other points.

Incidentally, a couple of the machines are x64 (didn't think of that, will take a look).

.NET - I'd love to move to .NET, but it's a massive undertaking and in truth, the current Access product is good enough to get to a level, where we could get a decent .NET developer (I hope :O).

I'm going to go into the the clients office later in the week and take a look.

Thanks as always - I'll come back to you after that (if not before).
0
 

Author Closing Comment

by:Andy Brown
ID: 34416361
Thanks LSM.

I ended up building my own form based calendar from scratch, Thanks for your guidance (as always)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now