Results 1 to 6 of 6
  1. #1
    cew75 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    9

    Changing Sensitive Data to Upload Here

    I need to change some sensitive data so I can upload a file here... Basically I want to change around 500+ peoples names to be something random in a file where they have an ID# column & First & Last Name columns.... Does anyone know how I could do that?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    paste the code below into a module, then run an update query on your fields.
    It will randomize the letters.

    usage:
    RandLtr([firstName])
    Code:
    Public Function RandLtr(ByVal pvWord)
    Dim i As Integer
    Dim vChr, vNum, vNewWord
    
    if IsNull(pvWord) then exit function
    
    For i = 1 To Len(pvWord)
       vChr = Mid(pvWord, i, 1)
       If vChr <> " " Then
          vNum = Random(26)
          vChr = Trim(Chr(vNum + 64))
       End If
       vNewWord = vNewWord & vChr
    Next
    RandLtr = vNewWord
    End Function
    
    'generate a random # between 1 and #given
    Public Function Random(ByVal pvNum)
    Random = Int((pvNum * Rnd) + 1)
    End Function

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    do you need all 500 records or will it still function with say 10 records of names? For a minor quantity, you could run an update query that many times and probably only need to change the last name. Keeping them all will be a bit of work methinks.

    Then again, maybe not if you don't need meaningful names.
    Last edited by Micron; 12-18-2018 at 11:36 AM. Reason: added comment
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,861
    you can dowload some dummy data from here.....http://www.generatedata.com/

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    I agree with posts so far. You don't necessarily need 500 records to highlight an issue. You can get test data from the internet as moke123 said; or roll your own as per ranman.

  6. #6
    cew75 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    9
    Thanks everybody!! I have used your tips and parsed down the number of records I needed to randomize. I still needed quite a few records but not 500..

    Thanks for the code Ranman256!!! Worked like a charm!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. macro to auto upload data
    By chr1stoper1 in forum Macros
    Replies: 2
    Last Post: 08-05-2015, 09:21 AM
  2. Custom upload data to Access from Excel
    By ketangarg86 in forum Access
    Replies: 1
    Last Post: 09-09-2014, 02:06 PM
  3. Data Upload issue from Excel to Access
    By shabar in forum Access
    Replies: 2
    Last Post: 02-05-2013, 12:49 AM
  4. External Batch Data Upload
    By RLJ in forum Import/Export Data
    Replies: 3
    Last Post: 01-28-2013, 07:52 AM
  5. Time sensitive data
    By ViRi in forum Forms
    Replies: 3
    Last Post: 02-27-2010, 01:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums