G
Guest
Following is the exact text copied from help instructions for the left function in Access 97, but when I do it in the query, I get the above message. I also get the same error message for mid and right functions. Any suggestions
Extract part of existing text values using a calculated fiel
1 In query Design view, create a query. Add the tables whose records you want to use
2 To find values in part of a field, use the Left, Right, or Mid function in an expression in an empty cell in the Field row in the query design grid.
The syntax for these functions is
Left(stringexpr,n
Right(stringexpr,n
Mid(stringexpr,start,n
The stringexpr argument can be either a field name (enclosed in brackets) or a text expression; n is the number of characters you want to extract; start is the position of the first character you want to extract
The following table shows examples of these functions
If the value in
Part ID is
This expression
Return
BA-7893-R12 Left([PartID],2) B
BA-7893-R12 Right([PartID],3) R1
BA-7893-R12 Mid([PartID],4,4) 789
3 Add any other fields you want to include in the query to the query design grid.
Extract part of existing text values using a calculated fiel
1 In query Design view, create a query. Add the tables whose records you want to use
2 To find values in part of a field, use the Left, Right, or Mid function in an expression in an empty cell in the Field row in the query design grid.
The syntax for these functions is
Left(stringexpr,n
Right(stringexpr,n
Mid(stringexpr,start,n
The stringexpr argument can be either a field name (enclosed in brackets) or a text expression; n is the number of characters you want to extract; start is the position of the first character you want to extract
The following table shows examples of these functions
If the value in
Part ID is
This expression
Return
BA-7893-R12 Left([PartID],2) B
BA-7893-R12 Right([PartID],3) R1
BA-7893-R12 Mid([PartID],4,4) 789
3 Add any other fields you want to include in the query to the query design grid.