O'Reilly logo

Access™ 2007 Bible by Gavin Powell, Joseph C. Stockman, Jennifer Reardon, Michael R. Groh, Michael R. Irwin, Cary N. Prague

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 13. Using Expressions in Queries and VBA Code

IN THIS CHAPTER

  • Building expressions

  • Using built-in VBA functions

  • Referencing Access objects within expressions

  • Using DLookup to look up data quickly

In this chapter, you gain a more complete understanding of expressions and functions. You have already seen and used expressions and functions in queries and forms in earlier chapters. This chapter focuses on more advanced expressions, and also discusses some of the most common built-in functions of Access. Built-in functions are very powerful in queries, forms, reports, and the VBA editor's Immediate window.

Note

This chapter uses the database named Chapter13.accdb. If you have not already copied it onto your machine from the CD, you need to do so now.

Understanding Expressions

Generally speaking, an expression is the means used to explain or model something to someone or something. An expression has a value — the expression 2 + 2 has a value of 4. Most expressions you use in Access have a value that is used by an Access application in place of a literal or simple numeric value.

In computer terms, an expression is generally composed of a combination of symbols, operators, numbers, strings, or identifiers that represent a numeric or string value. The expression is a representative object that Access uses to interpret something and, based on that interpretation, to obtain specific information. Simply put, an expression is a term or series of terms controlled by operators. Expressions are a ...

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