What event calls this code? You are describing a situation that exists where a value is created at the beginning of a process. That means the current value (not saved) for user1 becomes the same for when user2 begins and user1 has not committed the record already. If you save the num when user1 begins, then user1 cancels, there are gaps in the sequence if this cancellation removes user1's num value. That may or may not be important. If user2 tries to save and user1 has already saved, there are conflict errors if the values cannot be the equal. Same goes for user1 if user2 saves first.
To avoid all this mess, it is best to create the value in the form's BeforeUpdate event. If this value must be seen by the user during the process then I don't have an alternative suggestion at the moment.
I only did a quick review of the code and it seems you are basing part of this value construct based on the number of records in the table. Don't think I would do that. However, I'll leave those thoughts aside as the more important thing at present is about when you're doing what you're doing.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.