CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 1999
    Location
    Pune, Maharastra, India
    Posts
    59

    DT Picker Control

    Can i assign a null value to the dt picker control .ie in effect clear the contents of the DT Picker control


  2. #2
    Join Date
    May 1999
    Location
    Bogotá, Colombia
    Posts
    37

    Re: DT Picker Control

    You can assign the DTPicker a value of 0. This will work for time but I am not sure about date.

    e.g.

    DTPicker1.Value = 0#

    works when the DTPicker style is set to Short or Long Time.

    I'm not sure about how you would assign a similar value to a date.

    Hope that helps.

    Andrew


  3. #3
    Join Date
    Sep 1999
    Posts
    202

    Re: DT Picker Control

    You can assign null value (meaning - date is not set), but your picker must have checkbox:

    private Sub Form_Click()
    DTPicker1.CheckBox = true
    DTPicker1.Value = null
    End Sub

    private Sub DTPicker1_Change()
    If Not IsNull(DTPicker1.Value) then
    Caption = DTPicker1.Value
    else
    Caption = "date is not set"
    End If
    End Sub




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

Featured