Single-Line Expressions |
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")))
|
A single-line expression is a partial line of Visual Basic script and cannot be used in a multi-line script. |
Related Topics