Maybe where you're just repeating previous posts from other people then
you
could do the same quick Google that I did to find that one?
Rob,
Thanks for the note!
I didn't keep the source for the code so there was no way to give
specific
credit. I did not intentionally leave Wayne out. Credit now goes to
Wayne
for helping a second poster out with his code.
Steve
http://makeashorterlink.com/?U27B1160C
Steve, you could at least give Wayne a credit.
Below my signature line is some code you could modify to do what you
want.
However, you don't need to go to the bother. I can help you with your
database and I assure you that your data will be given 110%
confidentiality.
My fees are very reasonable.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
If you don't get the help you need in the newsgroup, I can help you
for
a
very reasonable fee. Over 1000 Access users have come to me for help.
From my files ---------
Example: TestRandomEntries 10, 10
will give 10 entries that are 10 characters long.
Public Sub TestRandomEntries(intQty As Integer, intLength As Integer)
On Error GoTo HandleError
Dim intValue As Integer, strValue As String, intCount As Integer
Dim db As DAO.Database, rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("Table9", dbOpenTable)
Randomize
Const DUPLICATE_INDEX = 3022
intCount = 0
strValue = ""
Do Until intCount = intQty
Do Until Len(strValue) = intLength
'Alpha Numeric characters are ASCII 48-57, 65-90, and 97-122
'Formula from the help file
'Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
intValue = Int((122 - 48 + 1) * Rnd + 48)
Select Case intValue
Case 48 To 57, 65 To 90, 97 To 122
strValue = strValue & Chr(intValue)
Case Else
End Select
Loop
With rst
.AddNew
![fldNumbers] = strValue 'Add data.
.Update 'Save changes.
End With
'Increment our counter to see
'how many we have added
intCount = intCount + 1
'Start a new string
strValue = ""
Loop
CleanUp:
On Error Resume Next
rst.Close
Set rst = Nothing
Set db = Nothing
Exit Sub
HandleError:
If Err.Number = DUPLICATE_INDEX Then
'Only count successful additions
intCount = intCount - 1
Resume Next
End If
MsgBox Err.Number & vbCrLf & Err.Description, , "Error"
Resume CleanUp
End Sub
Hi!
I need to pass my database to a help forum in order to get some
assistance.
I want to scramble up some of my data for privacy purposes.
Does anyone have an existing routine or suggestion on how to do this?
I'm ideally looking for some procedure I can pass a field value to
and
return a scrambled value. I can then use this procedure on any
column
in
any
table I want in future.
Thanks!
Chris