T59*SS2005*JKT108*SAMPLE '\\lean\vault\ss2005\JKT108.pdf' 19/02/2003 15:13 T59*SS2005*JKT109*TECHNICAL '\\lean\vault\ss2005\JKT109.pdf' 21/02/2003 16:12The problem is for each record there is whats known as an attach key. Therefore if the mainkey has never been created in the table a value of 2 is stored against that record in the table. Therefore if another attachment against the same mainkey is stored then it increases this value to 3. When writing a new record how can I increase the attachkey value if a record exists for this mainkey. So for example if I added another attachment to the first record above, as there is one already there ther attachkey field would be 3 and then 4 etc etc.