hello this code for add the auto number form the access table to the form vb but But it only works when the table contains data but when the table is empty does not work and the bill number appears a blank
Sub New()
InitializeComponent()
Try
Dim BillNo As New DataTable
BillNo = New DAL().selectdatatable(" Select * FROM client ")
For i As Integer = 0 To BillNo.Rows.Count
txtBillNo.Text = BillNo.Rows(i)(0).ToString + 1
Next
Catch ex As Exception
End Try