Datepicker - Problem with date selection |
Post Reply |
Author | |
Krass
Newbie Joined: 08 March 2007 Location: Canada Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 05 May 2007 at 1:07pm |
In VB, I have a button with the following code:
ctlDatePicker.select date
This highlights today in the datepicker. Perfect. The date I was on previously is still highlighted, but I guess I can just call an unselect routine or something to show only ONE day, and I guess that's no big problem.
My main problem is that this same line of code doesn't work under Access. When I execute that line of code, nothing hapend at all.
Any tips? Is this control supposed to work under Access, too? (I was able to configure it, set properties at design time, and I can see it properly on the form at runtime - just that important .select routine doesn't work)
Thanks!
|
|
Christian
|
|
Krass
Newbie Joined: 08 March 2007 Location: Canada Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I just found the reason why it wasn't working properly. The MaxSelectionCount was set to "1". And using the .select property doesn't seem to UNSELECT the current highlighted date - avoiding the .select function to be executed. I am gonna look through the help files to find the easiest way to unselect the current date (in my case, it could be an "UnselectAll" function - as I'm always only showing 1 date at a time).
Meanwhile, you can still reply with the best solution to this.
Thank you.
|
|
Christian
|
|
Krass
Newbie Joined: 08 March 2007 Location: Canada Status: Offline Points: 9 |
Post Options
Thanks(0)
|
.clearselection did the trick.
Sorry for the initial post - looks like I was able to answer myself. Hate it when I find a solution 5 minutes after posting.
Thanks for reading
|
|
Christian
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |