Results 1 to 7 of 7

Thread: VB.net WinForms Control Validation not working

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Oklahoma, USA
    Posts
    92

    VB.net WinForms Control Validation not working

    I have a form that has a Datetime picker which is bound to a SQL data source. I am trying to validate the control. I have put simple code in the events Leave, Validating, Validated and ValueChanged. They appear to fire in the order I have listed them. When I look at the value in the dtpSL_Login_Date.value at each break point it does not contain the updated value from the control until its gets to the valueChanged event. Is there a secret to get the changed value during the validate event. It seems weird that VS 2015 has a Validate event but the program can not access the updated value. What would one validate the load value? If not has someone figured out a work around.

    Code:
            If dtpSL_Login_Date.value = Save_SL_LogIn_Date Then
                Return
            End If
    Name:  Untitled.jpg
Views: 801
Size:  32.2 KB
    Attached Images Attached Images  
    Last edited by wjburke2; Feb 10th, 2020 at 05:16 PM.

Tags for this Thread

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