Visual FoxPro and Visual Basic

The Visual FoxPro and Visual Basic languages are similar in syntax but there are annoying differences between the functions and commands built into each of them.

Help is of course no help at all when you are moving from one language to the other. You may know that FoxPro uses substr() to extract a substring from text but the Access help index doesn't even have an entry for 'substring' and the Answer Wizard only wants to tell you about extracting data to Excel. You could try to look up the Left() function and try your luck with the "See also" links but "Left" isn't in the index either. You need to know that the VBA function is called "Mid" if you're going to get anywhere at all.

Working the other way can be even more frustrating. Many of the Visual FoxPro commands date from the 1980's and some names are short and strange abbreviations. If you are reading a FoxPro program then you need to remember that the first four letters of a command are all that are required. The meaning of the StrTran functionis obvious once you realise that the function performs a 'String Translate' but if you just see the first four letters - STRT - in a program then it's very difficult to guess the meaning.

The information here isn't exhaustive, you'll still need to use Help to discover the difference between Mid() and Mid$() in VBA or between AT(), ATC() and RAT() in VFP. At least it's a starting point for your search.

Language syntax

Program flow control

Handling text

Related Items

Text delimiters in VBA and VFP.

Visual Basic for Applications and Visual FoxPro delimiters for strings.

Read More

Text concatenation in VBA and VFP

Visual Basic for Applications and Visual FoxPro operators to concatenate text.

Read More

Text substrings in VBA and VFP

Visual Basic for Applications and Visual FoxPro functions to extract substrings from within a string of text

Read More

Trimming text in VBA and VFP

Visual Basic for Applications and Visual FoxPro functions to trim leading and trailing spaces from string of text

Read More

Finding characters in VBA and VFP

Visual Basic for Applications and Visual FoxPro functions to find the position of one character inside another string.

Read More