From the course: Access 2016: Advanced Tips and Tricks

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a Select Case function

Create a Select Case function

From the course: Access 2016: Advanced Tips and Tricks

Start my 1-month free trial

Create a Select Case function

- [Voiceover] The H function and the formatted name function that we just created involves some fairly simple calculations. But you're not limited to just these types of conversion formulas. Functions can actually leverage lots of the more traditional programming constructs that are available in Visual Basic. Let's write out a slightly more complex function that will be difficult to construct with the tools available in the access expression builder. In this example I wanna calculate our employee bonuses based upon their current salary and their job rating. Employees with a higher job rating will get a higher bonus percentage. To do this, we'll come over here into the navigation pane and we'll find the my functions module. I'll double click on it to open it up in the Microsoft Visual Bbasic for applications program. Then I'll come down here to the very end and I'll just press enter to give myself some space. And we'll type in a new public function. The name of this function is going…

Contents