Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to ABCD Core Part 1    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Make Entity Code
Ramona Woitas 
      
4 years ago
I LOVE the way you are building the ABCD database.  However I am not planning on using the Person Code in my database.  Can I skip it all together, or will I end up with problems later on, with what / how you are creating this database?
Richard Rost  @Reply  
          
4 years ago
As you'll see in Lesson 10, I switch from "Person" to "Entity" to encompass both individuals and organizations. So... stray from the path if you must, but... Caveat Aedificator.
Ramona Woitas OP  @Reply  
      
4 years ago
Not sure what you mean by Caveat Aedificator.
Scott Axton  @Reply  
        
4 years ago
Google is a wonderful thing...   "Let the Builder Beware"

In other words - Make changes at your own risk.
Richard Rost  @Reply  
          
4 years ago
You've heard of caveat emptor? Let the buyer beware. We'll... That's BUILDER beware. Lol
Ramona Woitas OP  @Reply  
      
4 years ago
Scott - That's what I thought, just wanted to make sure.
Richard - Never heard the term until today.  lol
Richard Rost  @Reply  
          
4 years ago
I made it up... With a little Google Translate. Lol
Scott Axton  @Reply  
        
4 years ago

Richard -
You did pretty good because I got a couple of hits on it.  I'd  heard of emptor but never aedificator.

Michelle Maughan  @Reply  
      
4 years ago
Hi Everyone who is building ABCD.
Can someone steer me in the right direction. I have built the ABCD to the end of ABCD5.
I had a small amount of sample data in there which all worked great.
I deleted my sample  EntityT and imported my EntityT that has over 10,000 records.
How do i get the EntityCode to populate all the null fields?
Scott Axton  @Reply  
        
4 years ago
How did you import your records without it?  Are all of the imported records NULL?  
If you followed the Core videos that field is set to required and in the form it's disabled. It should not have allowed you to import with out the Entity Code.

Any way no matter.  If they are already in EntityT,  I would set up a Recordset loop ( Developer 16 )and just loop through all the null records updating them as you go.

So basically (not runable just example) :

    If IS NULL EntityCode then
       EntityCode = MakeEntityCode()
       Move Next
    End if
Michelle Maughan  @Reply  
      
4 years ago
Hi Scott
I turned the locked for EntityCode to No before I pasted my EntityT in the data base.
All of the records for EntityCode are NULL.
I am more than willing to pay for your help. Can I email you directly?
Cheers
Michelle
Scott Axton  @Reply  
        
4 years ago
Michelle -
Make a copy of your database.  Make SURE to try this on a copy first!

Create a new form.  Doesn't matter what you name the form it's just temporary.
Put a button on it and name it DoEntityCode.
In the property sheet for the On Click event copy  and past the following code.

In the EntityT set Required to Yes again for the EntityCode.

Make sure that entering new records still works properly.

I made this using Richards Core1 db.  I'm still using 32 bit Access.  It assumes that you have the MakeEntityCode in a global module.

If everything worked - delete the temporary form and update code.  Let me know if you have issues.

Scott Axton  @Reply  
        
4 years ago

Private Sub DoEntityCode_Click()

   Dim db As Database
   Dim rs As Recordset
   Dim ec As String
  
   Set db = CurrentDb
   Set rs = db.OpenRecordset("SELECT * FROM EntityT WHERE EntityCode Is Null;")
  
   If rs.EOF Or rs.BOF Then
      MsgBox "No Records"
   Else
      rs.MoveFirst
      While Not rs.EOF
      
      ec = MakeEntityCode()

      rs.Edit
      rs!entitycode = ec
      rs.Update
      
      rs.MoveNext
      Wend
   End If
  
   MsgBox "Done"
  
   rs.Close
   db.Close
  
   Set rs = Nothing
   Set db = Nothing
End Sub
Michelle Maughan  @Reply  
      
4 years ago
Thank you so much Scott!
Worked perfectly!
Cheers
Michelle
Scott Axton  @Reply  
        
4 years ago
You're welcome glad it helped.

Just curious - how long did it take to run 10K records?  I only tested  a small data set.
Michelle Maughan  @Reply  
      
4 years ago
Less than 30 seconda

This thread is now CLOSED. If you wish to comment, start a NEW discussion in ABCD Core Part 1.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/14/2026 9:51:45 PM. PLT: 1s