开发者

Date Picker Control Not Displaying Proper Date (Access 2003)

开发者 https://www.devze.com 2022-12-31 00:09 出处:网络
I just have a quick question. I am maintaining an app for my summer co-op position, and a new requirement came down today where the user requested to have a date control added to a form to mark the da

I just have a quick question. I am maintaining an app for my summer co-op position, and a new requirement came down today where the user requested to have a date control added to a form to mark the date of when an employee is "laid off". This control is enabled/disabled by a toggle button, and has its control source bound to a field that I added in the database. All the functionality has been added and tested, but....

The issue I am having is that the date picker is on a tab control (the 2nd page) and I am having problems trying to get the control to display the date that is stored in the field I created. I know the control is storing any changes made using it, but since the user asked to move the control over to the 2nd tab (it was on the first), it just shows today's date, not the date entered using the control. To make things a little more strange, if I place the control anywhere except the tab control, it seems to be working fine. I'v开发者_如何学Pythone even placed a textbox on the tab and set its control source to the database field, and it displays just fine. What gives?

And I have registered the .ocx with Access, and as I mentioned before, the actual database is storing the data. Just not displaying it. Any ideas as to what I am doing wrong?


Drop that clunky MS data picker control... Try this completely MS Access native date picker: http://www.glump.net/software/microsoft_access_date_picker

You'll have to wire it up manually, but I find the effort totally worth it for date picker "control" (its actually a modal Access form) that works better and is more flexible.


After some more research, there seems to be a bug with using the date picker on tabs. Although my date picker was storing the right data in the database, it just wasn't displaying the value.

Apparently, you have to set focus to date picker before the value is to display. So on my tab change event, toggle control click event (and others) I set focus to the date picker, and now it is displaying the appropriate values. Took a lot longer than I wanted to, but what can you do?

0

精彩评论

暂无评论...
验证码 换一张
取 消