Visit our new web pages

We have launched a new extended set of web pages at www.alvechurchdata.co.uk. These old pages will stay on the server because people still have links to them but they will not be updated.

The new version of this page is at www.alvechurchdata.co.uk/hints-and-tips/foxautocomptable.html.

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.

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