Automatic assign id

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jl2886
    New Member
    • Mar 2007
    • 83

    #1

    Automatic assign id

    Code:
     Private Sub Form_Load()
    Dim assID As Long
       assID = DMax("CLng(Right([LSI_Case_Number],3))", "Master_Log")
       Me.LSI_Case_Number = Month(Date) & Format(Year(Date), "yy") & "-" & Format(assID + 1, "000")
    End Sub
    It reads an indentifier cursor error)
    The LSI_Case_Number is text variable, do i need to change it. Master_Log is the name of the table. Me.LSI_Case_Num ber is the variable but in a form.
    Any help?
Working...