Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ActiveX Calendar control for Access 2003

Posted on 2010-11-30
10
Medium Priority
?
492 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
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…

636 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