L
learning_codes
Hi,
I use this code to run the query. It works fine the first time from 1
to 10. When i rerun the query, I got 11-20. Can you help me how to
stop rerun and I prefer to have 1 to 10 if I want to rerun. I still
get 11-20. Help much appreciated.
Public Oldg1g2 As String
Public OrderNum1 As Long
Function getordernumber(Group2 As String)
newgg2 = Group2
If Oldg1g2 = Newg1g2 Then
OrderNum1 = OrderNum1 + 1
Else
Oldg1g2 = Newg1g2
OlderNum1 = 1
End If
getordernumber = OrderNum1
End Function
Thanks...
I use this code to run the query. It works fine the first time from 1
to 10. When i rerun the query, I got 11-20. Can you help me how to
stop rerun and I prefer to have 1 to 10 if I want to rerun. I still
get 11-20. Help much appreciated.
Public Oldg1g2 As String
Public OrderNum1 As Long
Function getordernumber(Group2 As String)
newgg2 = Group2
If Oldg1g2 = Newg1g2 Then
OrderNum1 = OrderNum1 + 1
Else
Oldg1g2 = Newg1g2
OlderNum1 = 1
End If
getordernumber = OrderNum1
End Function
Thanks...