acepeda 0 Light Poster

Hey guys!

I resolved a few problems I posted here thanx to some advice.But im still having trouble with one.I have a grid with 4 columns(ProductCode,Description,Price,ReferenceNumber).Which data is going to be added with 3 textbox(ProductCode,Description and Price)The ReferenceNumber will be added by combining the Ordernumber+ProductCode+number of times this product has been added.Cause this number cant be duplicated.Lets say its been added only once .Example:

Order Number:18020
ProductCode:1225
ReferenceNumber:18020-1225-01 (this is how it should look like)

But how Do I search the grid and count the times it has been added so I can add 1 to the last digits of the reference number everytime it is added.So it looks like this:

ReferenceNumber:18020-1225-02

Can I search for the last record where the field = 18020-1225 and add 1 to the last digits?if so please demostrate it to me,or any othere way of doing this.THANX

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.