Hi Tanetoa,
I'm guessing that you either have a rule or a default value that is always calculating.
To prevent it from regenerating the number, just add a condition to the rule, or convert the default value into a rule with a condition.
The condition should be if the field is blank. When it's generated, it will no longer be blank.
Make sure you don't have any other rules in your form that reset it (don't forget to check form load too).
Also, make sure your submit data connection is set up to overwrite existing.