J
Jason Buck
W/Access 2002:
I am trying to next SQL to go out and retrieve the max
Set Up ID, which is the Primary Key. That will assign a
record the next number after the max ID. Here is the code
I have embeded, before the record saves this sub
procedure is ran...
Private Sub assignId()
Dim nextID As Integer
'SQL = "SELECT MAX(SET_UP_NUM) AS maximum From [Set Up]"
'DoCmd.RunSQL SQL, False
' If IsNull(maximum) Then
' nextID = 0
' Me.SET_UP_NUM = nextID
' Else
' nextID = maximum + 1
' Me.SET_UP_NUM = nextID
' End If
Thanks for the help in advance!!
I am trying to next SQL to go out and retrieve the max
Set Up ID, which is the Primary Key. That will assign a
record the next number after the max ID. Here is the code
I have embeded, before the record saves this sub
procedure is ran...
Private Sub assignId()
Dim nextID As Integer
'SQL = "SELECT MAX(SET_UP_NUM) AS maximum From [Set Up]"
'DoCmd.RunSQL SQL, False
' If IsNull(maximum) Then
' nextID = 0
' Me.SET_UP_NUM = nextID
' Else
' nextID = maximum + 1
' Me.SET_UP_NUM = nextID
' End If
Thanks for the help in advance!!