?
Solved

ActiveX Calendar control for Access 2003

Posted on 2010-11-30
10
Medium Priority
?
490 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 85
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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
 

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 85
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 85
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

764 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