How to do Auto Increment Employee / Student ID

Submitted by cidfrey on
This is one of my professor's requirement on my thesis. I want to know how to give employee / student its number automatically. This is my code Private Sub cmdSave_Click() rs(0) = txtNo.Text rs(1) = txtName.Text rs(2) = txtCity.Text rs(4) = txtDob.Text rs(3) = txtPhone.Text rs(5) = Combo1.Text rs(6) = Combo2.Text rs(7) = Combo3.Text rs(8) = Combo4.Text rs(9) = Combo5.Text rs(10) = Combo6.Text rs.Update MsgBox "The record has been saved successfully.", , "ADD" cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdPrevious.Enabled = True cmdDelete.Enabled = True cmdUpdate.Enabled = True cmdSave.Enabled = False cmdSave.Visible = False cmdAdd.Enabled = True cmdAdd.Visible = True Command1.Visible = True Command1.Enabled = True Command2.Enabled = True Command3.Visible = False 'for refresh list Adodc1.Refresh txtNo.Text = rs(0) txtName.Text = rs(1) txtCity.Text = rs(2) txtDob.Text = rs(4) txtPhone.Text = rs(3) Combo1.Text = rs(5) Combo2.Text = rs(6) Combo3.Text = rs(7) Combo4.Text = rs(8) Combo5.Text = rs(9) Combo6.Text = rs(10) 'disabling the fields txtNo.Enabled = False txtName.Enabled = False txtCity.Enabled = False txtDob.Enabled = False txtPhone.Enabled = False Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False Combo5.Enabled = False Combo6.Enabled = False End Sub Hoping for a positive response I know some of you guys know this so please share it ^_^ hehehe