craigorama
Technical User
Hi again!
I'm trying to create a field in a table that will increment by +1 each time. However the value of the first row has to be a number other than 1.
I retrieve that value through the function Get_Location_No.
Here is my code:
Dim strSQL As String
Dim tabName As String
tabName = "TELLUS_REPORT_UTM"
Dim number As Double
number = Get_Location_No
MsgBox number 'The value is 572 here
strSQL = "alter table " & tabName & " add column loc_num counter (" & number & ",1)"
MsgBox strSQL
DoCmd.RunSQL strSQL
End Sub
However, the field still starts at '1'. How can I make it start at 572?
Thanks!
I'm trying to create a field in a table that will increment by +1 each time. However the value of the first row has to be a number other than 1.
I retrieve that value through the function Get_Location_No.
Here is my code:
Dim strSQL As String
Dim tabName As String
tabName = "TELLUS_REPORT_UTM"
Dim number As Double
number = Get_Location_No
MsgBox number 'The value is 572 here
strSQL = "alter table " & tabName & " add column loc_num counter (" & number & ",1)"
MsgBox strSQL
DoCmd.RunSQL strSQL
End Sub
However, the field still starts at '1'. How can I make it start at 572?
Thanks!