The header should be the first thing written to the flat file.
FlatFile = ‘CO=’ + Co#
then loop to write other records.
from <a href=”http://twitter.com/paulthehacker”>@paulthehacker</a> via twitter @ITKE Access VBA – CDbl(string) would convert a string to numeric. Better than CInt, chance the valu e has decimal places