Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create simple autocomplete form
Message
From
19/12/2013 19:15:09
 
 
To
19/12/2013 14:58:23
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01590652
Message ID:
01590660
Views:
64
mike your set up of Cetin's file works smoothly now - thanks for that.

this actually solves my previous enquiry regarding cluttered cdx -
when I add the following code to autocomplete=1, the phantom names disappear.
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.
>>So I will do this properly using a form - first of all can I get to work (see below)?.
>>
>>I am using mydbf.dbf and am trying to get autocomplete of field name Vname.
>>on selection do something.
>>
>>Appreciate it if you could fill in the great many blanks to get this going. I can flesh it out once the mechanism is working.
>>many many thanks if you can get this going it's becoming a thorn in my side.
>>k
>>
>>
>>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
>>
>
>Hi Karen
>
>Here's a simple example based on stuff Cetin Basoz has online.
>
>You could create the following table in a shared location.
>
>
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
>
>Hope that's enough to get you going.
Previous
Reply
Map
View

Click here to load this message in the networking platform