>Mike: 'I would not use the silly modal form approach either'
>Hugo: "Ahem!...."
>Mike: "She's standing behind me isn't she. "
>
>karen
Hi Karen
I think you are not understanding my comment - and possibly not Hugo's either. For a form to remain visible after the .prg or method that linked it to a variable - that variable has to remain in scope. The scope is the .prg/method normally. To me, modality of a form is for making nothing else happen until that form is closed. That is not needed in the sample here. Further there is rarely need for a modal form. It is an often abused technique.
There is a need for the form to remain active for the demo. That should only be done via READ EVENTS. As this is a simple example, based on Cetin's example, I took a shortcut and used his public var approach - something I never do - just like I never make a form modal unless it positively must be modal. Adding the code for READ EVENTS was all beside the point of just making an autocomplete form.
>
>>>>*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
>>>
>>>
>>>Shame on you Mike, you do not *NEED* a public variable, a local variable and a modal form would have done it just right for this example :P
>>>
>>>
>>>LOCAL oForm
>>>oForm = Createobject('AutoCompleteCountrySample')
>>>oForm.Show(1)
>>>
>>
>>I would not use the silly modal form approach either.