Hi guys
I am running Access 2007
I have an "orders" table with the following fields
linea: text
numero: numeric
I have a form with corresponding names for the controls
I need a piece of code which finds within the table orders the highest value for numero, where the value of linea equals the value selected by the user in the form via a combo box, and then sets the value of the control "numero" to that number +1
I know I have to use DMax but I am completely clueless as to the syntex or wherre to place the code (BeforeUpdate? AfterUpdate?)
I know there are hundreds of articles googling about but I just can't get it to work
Any help would be greatly appreciated
Thanks!