Results 1 to 5 of 5

Thread: what i do when save a null value and appear this Error message?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2018
    Posts
    4

    what i do when save a null value and appear this Error message?

    i am a new member in this wonderful forum, i hope to help me on this problem, i have a simple project after i fill text boxes then click on save button, if no value in text boxes , this message is appear, i want to change this message with another clear message like (( not allow to fill null value )), or if it's possible to write code check if the line is null, not save anything without this message appear, i hope to find solution, all thanks to you.

    Name:  Untitled.jpg
Views: 325
Size:  16.4 KB

  2. #2

    Thread Starter
    New Member
    Join Date
    Sep 2018
    Posts
    4

    Re: what i do when save a null value and appear this Error message?

    Name:  aqz.jpg
Views: 101
Size:  6.0 KB

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2018
    Posts
    4

    Re: what i do when save a null value and appear this Error message?

    this is the code which i using with Access database if you can add any code to solve this problem :

    Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    DataGridView1.EndEdit()
    Table15BindingSource.EndEdit()
    Table15TableAdapter.Update(A18DataSet.Table15)
    End Sub

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2018
    Posts
    4

    Re: what i do when save a null value and appear this Error message?

    this is the code which i using with Access database if you can add any code to solve this problem :


    Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    DataGridView1.EndEdit()
    Table15BindingSource.EndEdit()
    Table15TableAdapter.Update(A18DataSet.Table15)
    End Sub

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: what i do when save a null value and appear this Error message?

    You can handle the CellValidating and/or RowValidating events of the grid to apply validation. You can call the Validate method of your form before calling Update to ensure that the grid is validated before you try to save the data.

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