>>>The following code works fine when running the exe within VFP but does not work when running the exe from explorer - I think it is a problem with the mline function - the records are created in superdata but there is no data in ggg and consequently no data in linexdata
>>>
>>>Any ideas?
>>>
>>>SELECT super
>>>STORE 0 TO nn
>>>SCAN
>>>
>>>store memlines(indydata) to totlines
>>>
>>>for xx=1 to totlines
>>>store mline(indydata,xx) to ggg
>>>SELECT superdata
>>>APPEND blank
>>>replace linexdata WITH ggg
>>>SELECT super
>>>next
>>>endscan
>>
>>Apart from checking the contents of the super table (which are presumably OK if you say it runs fine in IDE), I'd check what settings may be different between your exe and IDE - set("memowidth") and what else may be related to mline() and memlines(). Check sys(2019) to see which config.fpw is in effect in each case.
>
>It nedded a set exact on at start of program - all works fine now
Now just find out why did you have that setting in IDE and not in the exe...