VFP 9 Autocomplete table structure

The AutoComplete table has a simple structure:

source The name of the field or the value in its AutoCompSource property.
data Text that has been entered in the textbox. This is restricted to 254 characters.
count The number of times that this text has been entered. This field is used when the list is displayed to the user in most-frequently-used order.
weight A user-defined value to display the list in a custom order.
created The time and date that this value was first entered.
updated The time and date that this value was last selected. You can use this field or the created field to automatically remove the older values from the list and just show the most recent values to the user.
user A memo field not used by the autocomplete feature and available for the developer.

The AutoComplete table shows some an unusual behaviour.

  • It does not appear in the list of work areas.
  • You can open the table shared before the form opens or whilst the form is on screen and alter the field values to change the behaviour of the textbox.
  • If you open the table exclusive before the form appears on screen then the form will run without AutoComplete but will report no errors. If you open the table exclusive whilst the form is on screen then AutoComplete will stop working. AutoComplete will start working again as soon as you close the table.