Avatar of wiswalld
Flag for United States of America

asked on 

Get next number from column in datatable

I posted an earlier question which I thought I had the answer and accepted. I use the following code to check for the last number and add 1. The problem I have is the first record is given 1 the next is also given 1 then 2,3,4......

 If Me.CaD_PRO_Plus_Datasat21.CAD.Rows.Count = 0 Then
            Me.EventNumberHiddenTextBox.Text = "1"
            Me.EventNumberHiddenTextBox.Text = CaD_PRO_Plus_Datasat21.CAD(CaD_PRO_Plus_Datasat21.CAD.Rows.Count - 1)(27)
        End If
Visual Basic.NET

Avatar of undefined
Last Comment
Göran Andersson

8/22/2022 - Mon