3
votes

I'm using a form that has date picker controls on it. When the form is opened and the datepicker control (MSCOMCT2.OCX) is clicked, I get the following unhelpful error:

The expression Change you entered as the even property setting produced the following error: There was an error loading an ActiveX control on one of your forms or reports.

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure.]
*There may have been an error evaluating the function, event, or macro.

I can dismiss this message, but then get the same thing complaining about

MouseMove

I haven't specified these events in the vba, so I'm at a loss for what could be causing this.

The problem Does not happen when I run it on my winXP w/ Access 2007 PC or my winXP w/ Access 2003 PC, but does happen on all other tested winXP w/ Access 2003's. Registering MSCOMCT2.OCX has no effect.

What could be causing this and how can I correct it?

1
Try setting a breakpoint so that you can step through the code. That way you will see the line that causes the error.Jacob
@cularis - I'd like to, but I don't even have those events declared in my vba. WHere would I set the breakpoint?MAW74656
Don't know your code, maybe you can paste it here or to pastebin or someting. I would try setting it somewhere where the control is being called in the code.Jacob
Another thing I just thought of: you may have not have the routine in code, but maybe you have set them on the properties window for the control?Jacob

1 Answers

4
votes

My impression is most experienced Access developers avoid ActiveX controls whenever possible. For a date picker, you definitely don't need ActiveX.

See Popup Calendar by Allen Browne. I've used his form (the version for "Access 2000 and later") successfully with both Access 2003 and 2007.

If that one is not to your liking, visit the links he provided (at the bottom of that page) for other approaches.