This is really tricky if you wan't restrict traceability of your records.
You basically need a way of finding out if your new random number has been used, there are a couple of ways you can do this:
o Check your existing table to see if your new number is in there, if it is then get a new number, this is very sloppy though and could slow right down when more numbers are used because it would have to keep generating numbers and checking them.
o Have a table containing all your numbers 1000-9999, then pick one at random and use this, then delete it from the table so it can't be used again. I don't know how you would select the number at random, maybe have a little code that loads up the table, moves forward throught the records a random number of times (going back to the start when getting to the end), then grabs the number it lands on, sorta like roulette!.
If I was you I would try the second option, that way you could easily add new number if you had to, and you could see how many numbers you had left.
If you can't figure it out, email me and I will send an example:
HTH
andrew.vanbeck@semefab.co.uk