01.
Private
Sub
AutoGenerateMemberID()
02.
Dim
ItemID
As
Integer
03.
Dim
s
As
String
=
"select MAX( Bill_ID ) FROM Billing "
04.
Dim
dr
As
OleDbDataReader
05.
dr = ExecuteReader(s)
06.
While
dr.Read()
07.
ItemID =
CInt
(dr(0))
08.
ItemID = ItemID + 1
09.
tb_billingNo.Text =
CStr
(ItemID)
10.
End
While
11.
dr.Close()
12.
End
Sub
13.
Private
Sub
tb_billingNo_TextChanged(sender
As
Object
, e
As
EventArgs)
Handles
tb_billingNo.TextChanged
14.
AutoGenerateMemberID()
15.
End
Sub