Single-Line Expression |
The Single-Line Expression is the simplest of the three script types supported by
All of the sample functions shown here are "string" functions, the most commonly used functions in
Function |
Description |
Field("PartNumber") |
Returns the data contained in the hypothetical database field "PartNumber". |
Left(<<String>>,<<Length>>) |
Returns the number of leftmost characters in String specified by Length. |
RTrim(<<String>>) |
Removes any trailing spaces from the right side of String. |
FormatCurrency(<<Expression>>) |
Takes the Expression or number and formats it like a price. |
UCase(<<String>>) |
Takes the characters in String and forces it to upper case. |
Arithmetic operators: + - * / &
Logical operators: < <= <> = > And Mod Not Or
All functions, including the Sample Functions shown above, are already single line expressions. In addition, you can combine functions using operators and even put a function within a function. (Some of the examples below assume use of a database containing fields called "PartNumber" and "Color".)
Left(<<String>>, << Length>>)
Left(Field("PartNumber"), 7)
Left(Rtrim(Field("PartNumber")), 7)
Left(Field("PartNumber"), 7) & (Rtrim(Field("Color")))
For a more detailed explanation of these and all functions available in Visual Basic Script, please see the Description option or press the Visual Basic Help button in the Script Assistant. For information on using
Related Topics