Expression Wizard

The Expression Wizard is used with the If and ElseIf objects.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The Expressions Wizard is used to build conditional statements to further narrow your query results. The Where clause filters records at the database level; the conditional statement queries your recordset results. For example, you have queried your "Students" table and returned 20 records of students majoring in Biology. Now, you would like to display these records on your Web site - however, you want to display senior records using a red font to set them apart. In this case, you can build a conditional expression by searching the Classification datafield for "seniors". The resulting expression would be:

 

If Classification = "senior"

font = red

Else

font = black

EndIf

 

You can add multiple conditions to one expression by including an ElseIf object. If you wanted to display freshman records in blue font, the resulting expression would be:

 

If Classification = "senior"

font = red

ElseIf Classification = "freshman"

font = blue

Else

font = black

EndIf

 

Notice that each expression has a beginning object (If) and a closing object (EndIf).

 

Next

 

Double-click in the ExpressionWizard field to open the editor.