Standard length on random autonumber (1 Viewer)

midastouch1

New member
Local time
Today, 17:08
Joined
May 30, 2014
Messages
6
I've seen a couple of posts on here related to this. I am in a similar situation as some of the other folks on here. I need to restrict the random autonumber feature to 10 digits and a positive number for a primary key. I work in the medical field, and HIPAA privacy regulations require the use of random ID numbers to identify records. Also, I need the numbers to be positive numbers because we will be using barcode scanning equipment and the possibility of truncating the negative identifier creates the possibility (admittedly remote) of having a duplicate PK barcodes. I understand that we cannot change the Access feature, but can anyone provide VBA code to generate a truly random 10 digit positive number I can use as a PK? Thanks in advance!
 

plog

Banishment Pending
Local time
Today, 16:08
Joined
May 11, 2011
Messages
11,646
I work in the medical field, and HIPAA privacy regulations require the use of random ID numbers to identify records

You are incorrect. Both in your idea of what 'random' means and what HIPAA requires. I did an advanced google search for the term 'random number' on the HIPAA site (https://www.google.com/search?as_q=...=any&safe=images&tbs=&as_filetype=&as_rights=). There were 5 matches, none of them specified that random numbers were to be used in assigning ids to patients.

The purpose of HIPAA is to keep health information private. That can be done with a simple autonumber primary key assigned to patients. You cannot use a primary key that uses pieces of personally identifiable information.

That means you can use 14577 as a primary key identifier for John Smith who lives at 123 Main Street with a zip code of 79031 and if the next person you enter is Sally Davis who lives at 987 Broadyway in zip code 34087 you can use 14578 for her ID. You cannot use JSMITH12379031 for Mr. Smiths ID and SDAVIS98734087 for their ID numbers.

So in conclusion, use an autonumber.
 

midastouch1

New member
Local time
Today, 17:08
Joined
May 30, 2014
Messages
6
Plog, while I appreciate your diligence in researching the requirements I posted, I'd prefer not to debate the merits of requirements passed down to me by my organization's Institutional Review Board (IRB) and by the Primary Investigator (PI) for the supported research project. Regardless of whether or not the requirement is spelled out plainly in your referenced HIPAA search, it is none the less a requirement that I am forced to adhere to. With that said, my original question still stands: can anyone guide me in creating a VBA module that generates a random 10-digit unique numeric string that I can can use to generate a PK?
 

Users who are viewing this thread

Top Bottom