Chapter 6. Conditional and Looping Statements

IN THIS CHAPTER

Introducing Flow of Control Statements 77

Using If...Then...Else 77

Using Select Case 80

Using For...Next 81

Using Do Loops 86

Using GoTo 89

Case Study: Calculating Bonuses 89

Introducing Flow of Control Statements

A large portion of programming can be summed up by two concepts: If...Then...Else and Do...While. These concepts, known as conditional branching and looping, make up approximately 75% of your code. Branching allows you to perform different tasks based on the value of a condition. Looping allows you to repeat a task while a condition exists. Each of these types of statements has different variations. Collectively they are referred to as flow of control statements because ...

Get Microsoft® Office Access 2007 VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.