angelandgreg
Technical User
Hello,
i've seen similiar posts but most seem to be just to add 1 from some existing field, etc ...
i need help with setting a restart on counter whenever the QuoteID is unique. The counter is the LineNumber field. It is blank.
Basically a line number should exist and always restart with 1 for every unique QuoteID.
This is to make it easier to reference it when the Customer Service rep is talking to the customer.
They would just say on LineNumber10 of QuoteID 12345 this and that and the other ...
If they just use the current ItemID field, at some point it may say 789008 and that's just more difficult when trying to reference something while talking with a customer.
And it should have line numbers per order (quote). So I need help with what I have partially got thus far ...
I have an Event on a field called Item. When the information in this field is entered I would like the LineNumber to start "counting" from 1.
Private Sub Item_AfterUpdate()
If IsNull(LineItem) Then
LineItem = "' and [QuoteID]=#" & Me.QuoteID & "#"), 0)) + 1)
End If
End Sub
and of course it's erroring ... can someone help me clean this up?
For every QuoteID the LineItem should restart with 1 and increment until the next QuoteID which then it should restart the LineItem with 1 and continue on.
i hope i made sense. I have search various posts. Autonumber, counter, increment, etc ...
i've seen similiar posts but most seem to be just to add 1 from some existing field, etc ...
i need help with setting a restart on counter whenever the QuoteID is unique. The counter is the LineNumber field. It is blank.
Basically a line number should exist and always restart with 1 for every unique QuoteID.
This is to make it easier to reference it when the Customer Service rep is talking to the customer.
They would just say on LineNumber10 of QuoteID 12345 this and that and the other ...
If they just use the current ItemID field, at some point it may say 789008 and that's just more difficult when trying to reference something while talking with a customer.
And it should have line numbers per order (quote). So I need help with what I have partially got thus far ...
I have an Event on a field called Item. When the information in this field is entered I would like the LineNumber to start "counting" from 1.
Private Sub Item_AfterUpdate()
If IsNull(LineItem) Then
LineItem = "' and [QuoteID]=#" & Me.QuoteID & "#"), 0)) + 1)
End If
End Sub
and of course it's erroring ... can someone help me clean this up?
For every QuoteID the LineItem should restart with 1 and increment until the next QuoteID which then it should restart the LineItem with 1 and continue on.
i hope i made sense. I have search various posts. Autonumber, counter, increment, etc ...