Free Lessons Courses Seminars TechHelp Fast Tips Templates Topic Index Forum ABCD

 Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon More... What's New? Popular Links ------------ Access Courses Access Index Access TechHelp Access Forum Access Troubleshooter Access Developer Network Access AI Bot ------------ Excel Courses Excel Index ------------ Code Vault Testimonials Tip Jar Advice for Consultants

 Home > TechHelp > Directory > Access > Random < Do Until Loop | Arrays >
Random
By Richard Rost     11 months ago

How to Generate Random Dice Rolls in Access VBA

S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark

In this Microsoft Access tutorial, I'm going to teach you how to generate random numbers with the Rnd function. We're going to learn about the Randomize statement, then see how to roll a 6-sided die to generate a random number from 1 to 6. As a fun example, we'll generate ability scores for a Dungeons & Dragons character by rolling three six-sided dice.

# Members

There is no Extended Cut, but here's the database for the Gold members.

Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the files from class plus get access to the Code Vault. If you're not a member, Join Today!

# Syntax

• X = Int((Rnd * 6) + 1)

# Resources

Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted

# Keywords

access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, Random, rnd, randomize, dice roller, roll a die, D&D character generator, D&D ability score generator, generate random numbers, Random number generator, dice simulation, tabletop RPG, ability score calculation, six-sided dice, D20 system, pseudo-random numbers, random seed, dice mechanics, random distribution, VBA random numbers, dice-rolling algorithm, custom RNG, D&D stats, D&D dice roller, roll 1d6

Start a NEW Conversation

Subscribe to Random