Results 1 to 3 of 3

Thread: [RESOLVED] DateTimePicker Checked property VB.NET 2003

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Resolved [RESOLVED] DateTimePicker Checked property VB.NET 2003

    Hi,

    I don't know why, but the dtp control is not allowing me to uncheck the checkbox within the control. I've tried many things like:

    VB Code:
    1. dtpFromDate.Visible = True
    2. dtpToDate.Visible = True
    3.  
    4. dtpFromDate.Value = Date.Now
    5. dtpFromDate.Checked = False
    6. dtpToDate.Value = Date.Now
    7. dtpToDate.Checked = False

    During this specific event, a user has selected an different option that "resets" the form. Since I am running an SQL statement based on the items selected, I wanted to start out with the DTP being unchecked by default so that the user doesn't accidently include the dates in the SQL query.

    Thank you for your help!

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: DateTimePicker Checked property VB.NET 2003

    try this
    VB Code:
    1. dtpToDate.Visible = True
    2. dtpToDate.Checked = True
    3. dtpToDate.Value = Date.Now
    4. dtpToDate.Checked = False

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Re: DateTimePicker Checked property VB.NET 2003

    Wow!
    Thanks! That worked. Not quite sure why, but, hey ... it works!

    I sure appreciate it.

    NLISI

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width