Subject Re: Correct place for code in form
From WJS <wara@nowhere.com>
Date Mon, 27 Apr 2015 20:58:06 +0200
Newsgroups dbase.getting-started

On 2015-04-27 07:53 PM, Randy Waldman wrote:
> I have this piece of code which is necessary for my form to run properly:
>
>> if file('f:\test_fruit.dbf')
>>    drop table test_fruit
>> endif
>
> 1.  It runs great at the very top of my .wfm
>       -- but the compiler deletes it
> 2.  Tried to run it in 'form open'
>      -- error message that 'file in use by another'
>
> Any idea where I can succesully put the code so that it will execute when the form opens and not cause an error?
> Thanks, randy
>

Put it in the header area.
i.e. above the line

** END HEADER -- do not remove this line
//
// Generated on ......
//

Wian