O'Reilly logo

Access 2007 Programming by Example with VBA, XML, and ASP by Julitta Korol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5Decision Making with VBA

You can make decisions in your VBA procedures by using conditional expressions inside the special control structures. A conditional expression is an expression that uses a relational operator (see Table 5-1), a logical operator (see Table 5-2), or a combination of both. When Visual Basic encounters a conditional expression in your program, it evaluates the expression to determine whether it is true or false.

Table 5-1: Relational operators in VBA

Operator

Description

=

Equal to

<>

Not equal to

>

Greater than

<

Less than

>=

Greater than or equal to

<=

Less than or equal to

Table 5-2: Logical operators in VBA

Operator

Description

AND

All conditions must be true before an action can be taken. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required