'By first principles, I mean
'Open text file
'For each record
'Write record tag open
'Write {data}
'Write record tag close
'Close text file
'With appropriate sections of {data} as required
So finally the solution is change the sub ...... ?
Private Sub Command2_Click()
' Const SQL_SELECT...