warranty numbers

krishnanhemanth

Registered User.
Local time
Today, 20:31
Joined
Jun 12, 2009
Messages
115
i have a situation where i have to create warranty numbers ( running ) for the qty deliverd

how am i suppose to handle this

plz help
thanks in advance
 
Can you give us more information to work with?
 
yes
the situation is ...
i have to generate a unique warranty number for every product that is being sold.

suppose i sell 75 nos on a particular day...then i need to generate a unique warranty number for the 75 nos ...that is wn-09-0001 to wn-09-0075

next if i sell 25 nos on another day ...then...wn-09-0076 to wn-01-0101

i can get the serial numbers using dmax ..but

how do i get all the numbers automatically

i deliver 75 nos and the sysytem generates the 75 id for me

is it possible
 
What is the 09 in wn-09-0001? The year, perhaps?

You've already been instructed, in one of your two previous posts on this same subject, on concatenating a number generated using DMax() and you prefix. Your stated end product appears to be changing, but if you want to do all of this in one fell swoop, and the 09 in the above example is the current year, you can use code like this:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim WarrPre As String
WarrPre = "wn-" & Format(Date, "yy-")

If Me.NewRecord Then
  If RecordsetClone.RecordCount = 0 Then
  Me.WarrentyNumber = WarrPre & "0001"
Else
   Me.WarrentyNumber = WarrPre & Format(DMax("val(Right([WarrentyNumber],4))", "ThreePartWarrentyNumber") + 1, "0000")
  End If
End If
End Sub
 
Last edited:
thanks very much for the idea and time

As per your instructions, i have started concenating to generate my serial numbers.

But what i really want is the auto generation of running serial numbers with respect to the number of products that is sold

i sell 75 products....then my serial number datasheet should be updated with 75 lines of serial number
 
Can I point out that if you base this on year and you sell 75 a day you do not have enough digits in your serial number?

Select the top existing number only Left(NUmber,4) WHERE year section = this year then inc by one? i am assuming that all of these are in one table...
 
hi

thanks for the reply

i have sorted it out and landed in the next soup

i have posted a new question

thanks again
 

Users who are viewing this thread

Back
Top Bottom