>>>>It is probably a Monday morning blind spot
>>>>
>>>>I want to create a text file where the headings all alphabetic are on one dbf
>>>>
>>>>and the detail to go under the headings is a mixture of text, numeric and dates on another dbf
>>>>
>>>>Can I copy the data from the first file to a text file and somehow append the data from the second file to the same text file?
>>>>
>>>>Thanks
>>>>
>>>>
>>>>Colin
>>>
>>>Sure,
>>>Check STRTOFILE() function and especially last parameter :-)
>>
>>Thanks can you give me example code
>>
>>one.dbf has the text headings
>>
>>two.dbf has the data which should appear in the text file under the headings
>>
>>Thanks
>>
>>Colin
>
>lcx = ''
>lcDelim = ' '
>sele one
>scan
> lcx = lcx+alltr(cHeader)+lcDelim
>endscan
>lcx = left(lcx,len(lcx)-len(lcDelim))+0h0D0A
>
>sele two
>scan
> lcx = lcx+transform(Field1)+lcDelim
> lcx = lcx+transform(Field2)+lcDelim
> *..
> lcx = lcx+transform(Fieldn)+lcDelim
> lcx = left(lcx,len(lcx)-len(lcDelim))+0h0D0A
>endscan
>lcx = left(lcx,len(lcx)-2)
>
>strtofile(lcx,'Yourfile.ext')
>
>
>something like this?
>You can replace TRANSFORM with something mor meaningfull, also remove spaces etc.
Very helpful - how do I put carriage return at and of each line
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing