Learning is not attained by chance, it must
be sought for with ardor and diligence.
-Abigail Adams
 
Home   News   Courses   Seminars   Templates   Help   TechHelp   Forums   Order   Contact   Logon  
 
Home > TechHelp > Directory > Access > Create Function
 
Create Your Own Custom Function
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   49 days ago

Create Your Own Custom Function in Microsoft Access VBA


 S  M  L  XL  FS  

In this video, I will show you how to create your own custom, user-defined functions in Microsoft Access VBA (Visual Basic for Applications). We will start with a subroutine, and then create a couple functions. We will create a random number generator, and functions to convert Celsius to Fahrenheit and vice versa. You will learn how to pass parameter values to functions, and have them return a value.

Michael in Louisville KY (a Gold Member) asks: I'm familiar with the built-in Access functions like Date() and Now(). Is there a way I can create my own custom functions to perform the specific calculations I need?

LINKS:
Learn VBA: https://599cd.com/acd1
Custom Functions: https://599cd.com/acd2
Another Random Number video: https://youtu.be/bseyHSZ7G90

BONUS FOR CHANNEL MEMBERS:
Silver Members and up get access to an EXTENDED CUT of this video which covers additional examples. That video will show you how to create public functions and global modules so your functions can be used in every form, report, and query in your database. You will see how to set a lower bound for your random numbers, so you can, for example, generate random numbers from 10 to 20. We will build a dice roller where you can roll any number of multi-sided dice in sets. Very handy for you gamers and D&D players who want to generate character stats. (This one's for the nerds like me). 

MEMBERS ONLY VIDEO: 
https://youtu.be/l4MYiuflR0M

BECOME A MEMBER:
https://youtube.com/channel/UCl7-jJie4ifOVK87FINIuDg/join

ADDITIONAL RESOURCES:
FREE Access Level 1: https://599cd.com/Free1
FREE Customer Template Database: https://599cd.com/XCDT
$1 Access Level 2: https://599cd.com/1Dollar
Your Questions Answered: https://599cd.com/TechHelp
Learning Connection 50% OFF: https://599cd.com/Connection
Survey: https://599cd.com/survey
Richard's Blog: https://599cd.com/blog
Access Forum: https://599cd.com/AccessForum
Twitter: https://twitter.com/LearningAccess
https://en.wikipedia.org/wiki/Microsoft_Access
https://products.office.com/en-us/access
https://microsoft.com/en-us/microsoft-365/blog/access/
Email Me: amicron@gmail.com

KEYWORDS:
ms access create function, calling a function in vba, vba function return, vba function arguments, vba global function, writing a simple function, vba editor, code builder, msgbox, hello world, parameter values, optional parameters, return value, random numbers, rnd, c to f, f to c, fahrenheit to celsius, celsius to fahrenheit, D&D, dice roller, dungeons & dragons, gamer dice, multi-sided dice, character stats

QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
 

Post a New Comment or Question
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 
 
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search The Site
Waiting List
Production Schedule
Code Vault
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

YouTube Channel    LinkedIn

Blog RSS Feed   
Keywords: TechHelp Access ms access create function, calling a function in vba, vba function return, vba function arguments, vba global function, writing a simple function, vba editor, code builder, msgbox, hello world, parameter values, optional parameters, return  PermaLink