From the course: Access 2021: Tips, Tricks, and Techniques

Unlock the full course today

Join today to access over 23,000 courses taught by industry experts.

VBA function basics

VBA function basics

- Access ships with many built-in functions that you can use to modify the data that's stored in your data tables. With a visual basic module, you can add your own custom functions so that you can save a complex calculation to use consistently over and over again throughout your entire application. Once written, you can call these new custom functions just like the built-in access functions with the expression builder, in order to enhance the output of your queries, forms, and reports. To get started we'll go to the Create tab and in the Macros and Code section on the far right of the ribbon, click the button at the top that just says Module. That'll start it up Microsoft Visual Basic for Application and give you a brand new code module and the default name will be Module1. We can see it over here in the project pane in the modules folder, and then we also have the properties pane down here in the bottom left. Now if…

Contents