Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Picker Control doesn't work on installation PC 1

Status
Not open for further replies.

FoxProProgrammer

Programmer
Joined
Apr 26, 2002
Messages
967
Location
US
I created an Access Form using version 2002 SP3. The Form includes a Microsoft Date Picker Control. I installed my application on a computer running Access version 2003 SP2. The date picker control caused an error. I looked in the list of Active X controls on the computer that had the error - the Microsoft Date Picker control is not there.

I came across an article on Microsoft's website that says the Date Picker control should be implemented in comctl32.dll version 4.7 and later.


Another Microsoft article describes how you can determine the version of comctl32 that is installed on the compuer. A sample C program that retrieves the version is provided.


How can I figure out what is causing the problem? Is there a way to call GetProcAddress from Visual Basic or is that not even the right way to approach this issue? Do I just need to add a Reference in Visual Basic or register the control or library? Shouldn't the Date Picker control already be installed in all Office 2003 SP2 applications?

Thank you.

dz
 
Thank you very much, Remou. That worked.

I don't understand why Microsoft doesn't include mscomct2.ocx in Office anymore. There's nothing in that OCX but common controls that one might use in their applications. Microsoft's website also provides very confusing (and apparently conflicting) information regarding the date and time picker control. It looks like the links that I found had nothing to do with the problem. Ok, off my high horse!

Best regards,



dz
 
Well, unfortunately this problem came back when I installed my database on another computer. When I open the database, the date picker control looks like a text box and Access returns an error...There is no object in this control...since it can't find the date picker control.

I looked in Tools\ActiveX Controls in Access and the date picker isn't there. The strange thing about this problem is that mscomct2.ocx is located in the windows\system32 folder. I set a reference to it in Visual Basic but the control still doesn't show up in the list of ActiveX controls in Access. I tried registering the file in Access as well (Tools\ActiveX Controls\Register). I don't understand why that would need to be done if the reference is set in VB, but I thought that I'd try it. That causes an error:

c:windows\system32\mscomct2.ocx was unable to add/remove itself to/from your system. Install/remove the conrtrol using a separate utility.

Then I thought that the version of mscomct2.ocx might be different on the two computers. Not so. The version on the computer that works and the one that doesn't work is 6.1.97.82

Any idea what the problem is?

Thank you!

dz
 
G'day FPP!

As my apps have to be distributed to many users, I just won't use those OCX controls, because of relentless probs such as you're experiencing.

While the Date Picker looks OK, data entry users don't like it... it's faster for them to type a date straight in... they know that if they type '7/12' Access will auto-complete it to '7/12/2007'. Swapping from keyboard to mouse slows them down.

However, I do add validation code on all my date fields that checks for valid dates (and also future dates, dates older than x days etc) in the BeforeUpdate event.

Max Hugen
Australia
 
This is a pretty common approach to using API only. Solve some of the portability issues.


I would give the user the option to either type or pull up the calendar. I use a double click event to pull of the calendar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top