Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Registration Seminar Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Random number stays the same
Remco Peters 
   
2 years ago
In lesson 4 I noticed that the generated key the user sees in the inputscreen is the same twice: 170554. When downloading the sampledatabase in the lesson, on opening I also got this code 170554 as key everytime I opened the inputscreen.

I added "Randomize" to my VBA in the doRegister private sub BEFORE the Key1 declaration and now it does randomize.

Is this a known error and right solution or am I seeing this wrong?
Sami Shamma  @Reply  
             
2 years ago
Watch this video
Richard explains how Random works
Random
Richard Rost  @Reply  
          
2 years ago
Yeah, I talk about this in the video. The random numbers in any computer program aren't really random, so if you start a computer and start a database and redo that cycle, you're going to get the same random number over and over again. So you need some kind of natural means of initializing when that randomize action takes effect - something like a keystroke, a mouse click, or even going out to the web to get the current time to the second, or something like that.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Registration Seminar Lessons.
 

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: 8/10/2026 5:58:19 PM. PLT: 1s