Scamble Data

G

Guest

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
 
P

PC Datasheet

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
 
J

John Marshall, MVP

PC Datasheet said:
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.

So master santos, how many times do you have to be told these newsgroups are
not for your personal ambulance chasing.

John... Visio MVP
 
P

peter walker

....go git 'im marshal...


:)

peter walker

John Marshall said:
So master santos, how many times do you have to be told these newsgroups are
not for your personal ambulance chasing.

John... Visio MVP
 
G

Guest

Thank you! I will investigate this, and jot your info down for future
services.

PC Datasheet said:
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




KitCaz said:
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
 
S

StopThisAdvertising

PC Datasheet said:
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.

These 1000 (if at all a real figure..) is only the result of
-- 4 years abusing the newsgroups.
-- 4 years blatantly advertising and jobhunting.

You just don't care about the newsgroups. You have no ethics at all.
You only care about making money, and you act as if the groups are your private hunting ground.

-- You abuse this group and others for job-hunting and advertising over and over again
-- You are insulting lots of people here when they ask you to stop this
-- You posted as Steve, Ron, Tom, Rachel, Kathy, Kristine, Heather and ??? while asking questions
(the latest 'star's': 'Access Resource' and Tom (e-mail address removed))
-- You try to sell a CD ($125,--) with FREE code you gathered from these groups here
-- There even has been a 'Scam-alert' about you which has been explained recently in the thread 'To all':
http://groups.google.com/group/comp.databases.ms-access/msg/46038ba2954261f9?hl=en
-- Also recently it became clear that you have been spamming innocent people asking questions:
http://groups.google.com/group/comp.databases.ms-access/msg/4f76d0ed3e5f58ad?hl=en

So why would ANYBODY ever trust a person like you and hire you?
********************************************************

To all: Explanation and more on this answer to Steve:
http://home.tiscali.nl/arracom/stopsteve.html

Arno R
 
W

WSF

Hello Steve


Thank you! I will investigate this, and jot your info down for future
services.

:

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
 
R

Rob Oldfield

http://makeashorterlink.com/?U27B1160C

Steve, you could at least give Wayne a credit.

PC Datasheet said:
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




KitCaz said:
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
 
P

PC Datasheet

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


Rob Oldfield said:
http://makeashorterlink.com/?U27B1160C

Steve, you could at least give Wayne a credit.

PC Datasheet said:
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




KitCaz said:
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
 
R

Rob Oldfield

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?


PC Datasheet said:
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


Rob Oldfield said:
http://makeashorterlink.com/?U27B1160C

Steve, you could at least give Wayne a credit.

PC Datasheet said:
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
 
J

John Marshall, MVP

PC Datasheet said:
Rob,

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


So master santos is this part of the code on the CD you sell? Do you give
credit for any of the code on the CD?

John... Visio MVP
 
R

Rob Oldfield

....and I think you have a bit of a problem with your website. Somehow it
seems to be triggering a pop up advertisement. Must be a mistake somewhere
surely.


PC Datasheet said:
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


Rob Oldfield said:
http://makeashorterlink.com/?U27B1160C

Steve, you could at least give Wayne a credit.

PC Datasheet said:
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
 
S

StopThisAdvertising

PC Datasheet said:
Rob,

Thanks for the note!

I didn't keep the source for the code so there was no way to give specific
credit.

No Steve. This again shows 'something' about you, your credibility, your ethics.
Showing off with other peoples code... sigh.
I Bet indeed this is on your CD ... without credits, because "there was no way to "
You make me puke !

Arno R
 
P

PC Datasheet

Rob,

Thanks for the suggestion. I will do that from now on if you explain to me
how to google when you just have the code.

Steve


Rob Oldfield said:
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?


PC Datasheet said:
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


Rob Oldfield said:
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
 
P

PC Datasheet

Rob,

Thanks for the alert! I have no idea how it got there or how to remove it.
It hasn't always been there. Do you have any idea on how to remove it?

Steve


Rob Oldfield said:
...and I think you have a bit of a problem with your website. Somehow it
seems to be triggering a pop up advertisement. Must be a mistake
somewhere
surely.


PC Datasheet said:
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


Rob Oldfield said:
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
 
W

WSF

"I will do that from now on if you explain to me how to Google when you
just have the code". More of your weasel nit picky choice of words Steve?

Well, I guess with Google being all so new it stands to reason that a
novice would ask such a question. But your are no novice are you Steve,
or is it "Tom"? You sure are entertaining. You expect anyone here to
really believe you need help with Google? Why do you treat all those who
question your ethics as infidels? And just how would you know this is
the "second" poster helped out with this code? How did you work that out?


PC said:
Rob,

Thanks for the suggestion. I will do that from now on if you explain to me
how to google when you just have the code.

Steve


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
 
R

Rob Oldfield

No idea I'm afraid. I'd suggest talking to whover set the site up and/or
whoever hosts it.


PC Datasheet said:
Rob,

Thanks for the alert! I have no idea how it got there or how to remove it.
It hasn't always been there. Do you have any idea on how to remove it?

Steve


Rob Oldfield said:
...and I think you have a bit of a problem with your website. Somehow it
seems to be triggering a pop up advertisement. Must be a mistake
somewhere
surely.


PC Datasheet said:
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
 
R

Rob Oldfield

It's just a case of picking something out that's likely to be unique.
Comments are most likely to do that I think so in this case I just searched
for "'Increment our counter to see"


PC Datasheet said:
Rob,

Thanks for the suggestion. I will do that from now on if you explain to me
how to google when you just have the code.

Steve


Rob Oldfield said:
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?


PC Datasheet said:
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
 
P

PC Datasheet

It doesn't take a rocket scientist!

When Wayne previously posted he helped the first poster. When I posted
Wayne's code, Wayne indirectly helped a second poster. 1 + 1 = 2
lamebrain!!!


WSF said:
"I will do that from now on if you explain to me how to Google when you
just have the code". More of your weasel nit picky choice of words Steve?

Well, I guess with Google being all so new it stands to reason that a
novice would ask such a question. But your are no novice are you Steve, or
is it "Tom"? You sure are entertaining. You expect anyone here to really
believe you need help with Google? Why do you treat all those who question
your ethics as infidels? And just how would you know this is the "second"
poster helped out with this code? How did you work that out?


PC said:
Rob,

Thanks for the suggestion. I will do that from now on if you explain to
me how to google when you just have the code.

Steve


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top