Increment version number based on productcode

Heidebloempje

New member
Local time
Today, 16:14
Joined
Jul 26, 2012
Messages
4
Hi,

I have been looking around the internet and this forum but am not able to exactly find the answer I'm looking for.
What I want and need is this:

I have a database with customers and products.

I created a form to start a new record. When I choose to add a new record I want:
- Select an existing customer
- A combobox shows then the existing productcodes, versionnumbers and productnames for that customer. ( a productcode can have more versionnumbers but are unique combined)
- Two scenario's appear here:
- I have a new productcode for this customer so I would like to have a button that increments the highest productcode of that customer by 1 and sets the versionnumber as 1.
- I have a new version number for an existing productcode for that customer and I select the productcode in the combobox. Then I would press a button that increments the versionnumber by 1.

I press a Save button to add the new record to the database.
My questions are:
How am I able to differentiate between the two scenario's and what code is neccessary for the buttons. I believe it is dmax and should be simple when I want to add a new productcode I believe? But is it possible to select an existing productcode and then let the button increment the version number related to that productcode?
 
Thanks. I came across that one before, but it not what I mean.
 

Users who are viewing this thread

Back
Top Bottom