Well, I thought I had it working...
If there is one record in the subform, calling RunExportSpec or performing a manual export, will create one record in the txt file and the import works fine. If there are two or more records in the subform, RunExportSpec, or manual export will create as many parent records as there are entries in the subform, in the txt file. All the data from the subform does get listed in the txt file. When you run an import, you get as many new records as there are subform entries, each containing one line of the subform data.
Of course, I only want one record containing all of the subform data.
I hope I was clear enough on this, any help would be appreciated, thanks.
Here's the code:
var vSpec as String
var vFile as String
var vRun as Int
var vNav as Int
vRun = @LoadExportSpec("ExportRefRecord")
If vRun = 1
{
RunExportSpec("Docs\ExportRef.txt",",","",0,1,0,1,0,1,0,0) //RunExportSpec("Docs\ExportRef.txt",",","",0,1,0,1,0,1,0,0)
}
vNav = @SelectTreeItem(@Application + "!Forms!Add Data!Reference!Reference")
@exit