using a random number generator, there is a possibility that it could generate the same number twice, although it is a slim possibility. To prevent this from happening, you could set the member number in the database to not allow duplicates, you could also use Server Validation Unique Database Value on that column, that will look up the random number to ensure it has not been used and fail validation on the off chance it already exists.
using the random number generator will be fine, just use the Unique DB value also.
another option would be to use the Primary ID Auto Increment column for the member number, the downfall there, is that each one will increment by 1, but it will always be unique.