Database development and training for Birmingham and the midlands
Specialists in Microsoft Access and Visual Foxpro database training and development
I am happy to hear from existing clients but I am taking no new calls.
Visual Basic and Visual FoxPro Text Concatenation
VBA+ or & |
VFP+ or - |
Visual Basic Syntax Notes
VBA allows you to mix numbers and text. If you use "&" then the result will always be text, if you use "+" then the result will be numeric if the two strings can be interpretted as being numbers:
"1" + 2 gives 3
"1" & 2 gives "12"
"1" & 2 gives "12"
Visual FoxPro Syntax Notes
The "+" operator works the same in FoxPro as it does in VBA and is used for both text and numbers. The Fox "-" operator is unusual in that it removes trailing spaces before concatenating the two strings and then adds these spaces to the end of the result:
"a " - "b " gives "ab "