FoxPro Table Functions


Some of the more useful functions which provide information about FoxPro tables. Most apply to the current work area but many accept extra optional parameters to refer to another table. Look in the FoxPro Help system for more information.

AFIELDS(<name>) create an array <name> holding details of the fields. Note that the size of this array changed between VFP 7 and 8.
ALIAS() return the alias in use in the current work area.
AUSED(<name>) create an array <name> of the aliases in use and return the count.
CDX(1) return the full name and path of the current index file.
DBF() return the full name and path of the current table.
FCOUNT() return the number of fields in a table.
FIELD(<number>) return the name of field number <number>.
FSIZE(<name>) return the size of the field named <name>.
KEY(<number>) return the expression of index number <number>.
ORDER() return the name of the index tag in use.
RECCOUNT() return the number of records in the table. Note that RECCOUNT ignores the state of SET DELETED and SET FILTER.
RECNO() return the number of the current record.
TAGCOUNT() return the number of index tags in a table.
TAG(<number>) return the name of index number <number> in a table.
USED(<name>) return .T. if <name> is in use.

Other functions

FoxPro bit manipulation functions
FoxPro date functions
FoxPro numeric functions
FoxPro text functions

Hints & tips

The textbox class in Visual FoxPro 9 has a new Autocomplete property which shows the user the previous values that have been entered in that textbox.
Autocomplete in VFP 9

Your Access database will look more impressive if you add custom toolbars...
Custom toolbars

FoxPro has always had functions to read and write files at a low level...
Foxpro low level file functions

More...
More pages of hints and tips for users of Microsoft FoxPro and Access databases.

Site Map