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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTPicker - Only Allowing Certain Values

Status
Not open for further replies.

GoatieEddie

Technical User
Nov 3, 2003
177
CA
Hi all,

I like the look of DTPicker and want to use it on my form. All works well.

What I want to do is gray out values which don't exist in the table ie only allow valid dates to be selected by the user.

I can't find anywhere to set this property so am I hoping for too much? At the moment I just use a combo-box.

Thanks
GE
 
The answer is no.. You can't do anything more than formatting font/color etc.. on a DTPicker.

________________________________________________________
Zameer Abdulla
Help to find Missing people
My father was a realistic father; not a vending machine dispense everything I demanded for!!
 
I'm not sure how your DB is set up but if your dates are in a set range (e.g. this year 01/01/2005 - 31/12/2005) you can set the min and maxdates of the DTPicker Control via code:
Code:
DTPicker5.MinDate = "19/10/2004" [green]'you can use your minimum DB date[/green]
DTPicker5.MaxDate = "21/10/2005" [green]'you can use your maximum DB date[/green]
Not sure if this will help you but I posted just in case as it's a couple of properties of the DTPicker that don't show up in the list of available properties when coding.

Cheers

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top