The AutoComplete_SetOptions() function sets several options for auto-complete functionality.

Be sure this function is run only when all forms that contain auto-complete fields have been closed. Otherwise, auto-complete items won’t be saved in the correct location.


AutoComplete_SetOptions(folder_name, max_items, max_age)


folder_name – A string value that specifies the name of the folder that will contain the auto-complete files. This additional folder will be located in the \Application Data\Microsoft Business Solutions\Product_Name\ folder for the user currently logged into the workstation. The Product_Name will depend on the name you’ve given your application.

Use this parameter when you want your application to have multiple sets of auto-complete items, such as one set for each different company. If you don’t want multiple sets of auto-complete items, specify the empty string ("").

max_items – An optional integer that specifies the maximum number of auto-complete items each field can have. The value can range from 6 to 32,000. If this number is exceeded for a field, the oldest auto-complete item for the field is removed.

max_age – An optional integer that specifies in days how long auto-complete items should remain in the auto-complete data. Each time an auto-complete item is selected, it is updated with the workstation’s current system date. If the age of an auto-complete item exceeds the specified limit, the item will be removed. The value 0 (zero) indicates auto-complete items will be kept forever.

Return value


Documentation Feedback