![](/forum/profile/get-photo.asp?memberid=30&type=profile&rnd=592) Extreme Veteran
Beiträge: 565
![500](http://www.donkarl.com/forum/images/decorations/multiple/500.gif) ![25](http://www.donkarl.com/forum/images/decorations/multiple/25.gif) ![25](http://www.donkarl.com/forum/images/decorations/multiple/25.gif)
| Hallo,
pwakolbi - 08.08.15 15:51
'DoCmd.TransferText acLinkDelim, "", "tmpProdukt", strAktVerz "Produkt.txt", False, ""
Wofür ich dankbar währe, wenn es eine mögliichkeit gibt die Spezifikation per VBA zu erledigen
Beispiel:
Private Function CreateIMEX()
Dim strSQL As String
Dim ID As Long
strSQL = "INSERT INTO MSysIMEXSpecs ( DateDelim, DateFourDigitYear, DateLeadingZeros, DateOrder, DecimalPoint, " & _
" FieldSeparator, FileType, SpecName, SpecType, StartRow, TextDelim, TimeDelim )" & _
" VALUES ( '.', -1, -1, 0, '.', '" & vbTab & "', 1252, 'MySpec', 1, 0, '', ':' )"
CurrentDbC.Execute strSQL , dbFailOnError
ID = DLookup("SpecID", "MSysIMEXSpecs", "SpecName='MySpec'")
strSQL = "INSERT INTO MSysIMEXColumns ( [Attributes], [DataType], [FieldName], [IndexType], [SkipColumn], [SpecID], [Start], [Width] ) VALUES ( 0, 10, 'MyText1', 1, 0, " & ID & ", 7, 7 )"
CurrentDbC.Execute strSQL , dbFailOnError
strSQL = "INSERT INTO MSysIMEXColumns ( [Attributes], [DataType], [FieldName], [IndexType], [SkipColumn], [SpecID], [Start], [Width] ) VALUES ( 0, 4, 'MyLong1', 0, 0, " & ID & ", 1, 3 )"
CurrentDbC.Execute strSQL , dbFailOnError
strSQL = "INSERT INTO MSysIMEXColumns ( [Attributes], [DataType], [FieldName], [IndexType], [SkipColumn], [SpecID], [Start], [Width] ) VALUES ( 0, 8, 'MyDate1', 1, 0, " & ID & ", 25, 11 )"
CurrentDbC.Execute strSQL , dbFailOnError
End Function
Wenn du weitere Feldtypen brauchst, siehe http://www.access-im-unternehmen.de/732 und such nach dbBoolean.
----- Gruss - Peter |