Results 1 to 9 of 9
  1. #1
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122

    Scramble Name field in a Database


    What's the easiest way to scramble the Name field in an Access Database? I want to use it to demo, but I don't want to display real names.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There is no easy way to scramble. But you could easily reduce each name to maybe just an initial.

    What do you mean by 'real' names - people in your organization? Names without personal identifying info - such as SSN, address, phone, email - mean nothing. So unless db has real data about people, why worry about names?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Create two alphabetic strings, one normal, the other with the characters swapped.
    Then substitute the swapped characters in a loop.

    Moke123 & Micron have already created a utility to do that for you?
    https://www.accessforums.net/showthr...t=randomize#19

    Edit: Added Micron to credits for code.
    Last edited by Welshgasman; 10-17-2023 at 12:21 AM.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122
    Thank you both. I will try this tool

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    You can find lots of code examples on how to encrypt/decrypt fields, but that will only provide minimal masking. As for the utility mentioned (which I think was basically the same as the one I posted first) it will change data without the ability to revert it? Perhaps Moke's is able to revert to the original data so it is better than mine, which is why mine never gets linked?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Quote Originally Posted by Micron View Post
    You can find lots of code examples on how to encrypt/decrypt fields, but that will only provide minimal masking. As for the utility mentioned (which I think was basically the same as the one I posted first) it will change data without the ability to revert it? Perhaps Moke's is able to revert to the original data so it is better than mine, which is why mine never gets linked?
    Admittedly I stole your code Micron. Personally I like to think of it as we collaborated on it.

    Here's a link to the original thread. . . https://www.access-programmers.co.uk...ed-dbs.306745/
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Over the years I have accumulated a range of sample data - people, companies, products, etc. there are a number of sites out there where you can specify what you want and get a csv download. There is also the Northwind database(s)

    if you already have your app with real data, easy enough to take a copy of the table, then use an update query to replace the real names. I usually just match on the ok

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Like @C_J_London, I regularly use sample data which is often obtained from online sites
    For example, one site that offers random data generation is Mockaroo - Random Data Generator and API Mocking Tool | JSON / CSV / SQL / Excel
    As the link shows, a wide variety of output types are available

    There is a record limit per download but you can run the data generation repeatedly to get large datasets
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    perryc is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2019
    Posts
    122
    I have used the Randomizer Form and it works like a charm! Ty all!!

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

Similar Threads

  1. Replies: 4
    Last Post: 01-23-2020, 05:41 PM
  2. Replies: 6
    Last Post: 10-30-2018, 04:35 AM
  3. Replies: 1
    Last Post: 07-01-2015, 04:18 AM
  4. Replies: 3
    Last Post: 07-25-2014, 11:15 AM
  5. Comparing form field with the field from database
    By np1111 in forum Programming
    Replies: 1
    Last Post: 03-22-2010, 10:01 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