Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2013

    Arrow Unanswered: Auto generate ID number

    Hi! I'm quite new with VBA in access.. Can anyone help to auto generate an ID number? I've tried the following codes, but when I add a new record the ID number does not appear at all...

    Private Sub StudID_BeforeUpdate(Cancel As Integer)
    Dim tot As Integer
    tot = 0
    tot = tot + 1
    StudID = S + tot
    End Sub

    Thanks in advance!

  2. #2
    Join Date
    Nov 2011

    Auto Generate ID Number

    There are many examples in this forum. Here is an example. Hope this helps.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts