Here’s a nice function I found that will completely randomize information within fields of a database. Data will not be recoverable from this process which of course is its strength.
Good if you are wanting to demonstrate a database to people that normally contains sensitive information but don’t have time to make up your own records.
Works on text fields and will randomize numbers as further numbers and letters as further letters.
Public Function ScrambleID(parmString) As String Dim lngLoop As Long Const cAlpha As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Const cNum As String = "0123456789" Dim strNewChar As String Dim strThisChar As String For lngLoop = 1 To Len(parmString) strThisChar = Mid$(parmString, lngLoop, 1) Do Select Case strThisChar Case "A" To "Z" strNewChar = Mid$(cAlpha, Int(Rnd * Len(cAlpha)) + 1, 1) Case "0" To "9" strNewChar = Mid$(cNum, Int(Rnd * Len(cNum)) + 1, 1) End Select Loop While strNewChar = strThisChar ScrambleID = ScrambleID & strNewChar Next End Function