Like below quotes for serial no. for VB.net, do you have codes for ms access?
Anil Gamare
***********
Try This :
Public Sub GenerateNotaId() Dim myReader As SqlDataReader conn = GetConnect() conn.Open() Dim temp As String Try Dim sql As String = "SELECT MAX(IDNOTA) AS 'KODE' FROM Nota " Dim comm As SqlCommand = New SqlCommand(sql, conn) myReader = comm.ExecuteReader If myReader.HasRows Then While myReader.Read() temp = myReader.Item("KODE") + 1 End While End If myReader.Close() Catch ex As Exception End Try conn.Close() If temp = 0 Then txtNoNota.Text = 1 Else txtNoNota.Text = String.Concat(temp) End If End Sub
Generate will shown in txtNoNota