text1.AutoComplete = 1 text1.AutoCompTable = 'mytable' text1.AutoCompSource = 'myfieldname'>>Can anyone please give me hand in the right direction. I am going to start fresh on this since my old autocomplete programming is not working very well.
>>Public oForm >>oForm = Createobject('AutoCompleter') >>oForm.Show >> >>Define Class AutoCompleter As Form >>Add Object Sname As TextBox With top=10, Left=10,; >>AutoComplete = 1,; >>AutoCompTable = 'mydbf',; >>AutoCompSOurce = 'Vname' >>Enddefine >>>
IF NOT FILE("myAutoCompCountries.dbf") >Select ; > CAST('MyCountries' As c(20)) As 'Source',; > CAST(country As c(254)) As 'Data',; > CAST(1 As Int) As 'Count',; > CAST(0 As Int) As 'Weight',; > DATETIME()-60 As 'Created',; > DATETIME() As 'Updated',; > CAST('' As m) As 'User' ; >FROM ; > (_samples+'data\country') ; >INTO Table ; > myAutoCompCountries >USE IN 'myAutoCompCountries' >ENDIF > >*Then the form looks like this... > >*I rarely use public in production, but without it, this sample will end as soon as it reaches the last line of code. > >Public oForm >oForm = Createobject('AutoCompleteCountrySample') >oForm.Show > >Define Class AutoCompleteCountrySample As Form > Add Object txtCountry As TextBox With top=10, Left=10,; > AutoComplete = 1,; > AutoCompTable = 'myAutoCompCountries',; > AutoCompSource = 'MyCountries' >Enddefine>