Link to home
Create AccountLog in
Avatar of canuckconsulting
canuckconsultingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Enabling Datepicker Active X in VBA repositions it on page

I am using MS Access 2010 and have added a Microsoft Date and Time Picker Control 6.0 to a page on my form.  With both the SP4 and SP6 versions of the control I am having problems when setting the enabled property in VBA.

I have a checkbox which when clicked toggles the enabled property of the picker.  The problem is when I enable the picker it is repositioned to the top left corner of the page.  When I then disable it it moves back to where it should be.  Why is this happening?
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
and if you really want to stick with the one you have, maybe hiding it instead of enabling/disabling?

 Sounds like it has compatibility issues though, so I'd be more inclined to stay away from it.

Jim.
Avatar of canuckconsulting

ASKER

Thanks Jim.

I am very happy to use the built in control but am struggling to find it!  I should mention the inputs for the datepickers are unbound so I'm unable to use textbox feature to my knowledge.
Found it!

"
You just add a textbox, set its Format property to one of the Date formats, and set its [Show Date Picker] property to "For Dates".
"

Perfect...what a waste of time that was!
Thanks Jim