See responses below preceeded by ... I apologize for the length; I tried
to
be concise as possable.
--
LF
Ken Snell (MVP) said:
Is the autonumber field the first field in the table? ...Yes
If yes, move it to the last field in the table.
...I tried this, and got the same "You can't import this file" error.
I assume that there is no corresponding field in the text file for the
autonumber ...Correct
and that the table has one field more (the autonumber field) than the
text file;
... The table has 8 fields (5 for which MySysIMEXColumns.SkipColumn =
true)
... The text file has 4 fields (for which MySysIMEXColumns.SkipColumn =
false)
if yes, then the import won't try to write data into that field but will
let the table
insert the sequential number into the field as each record is imported.
... I got this result, with the autonumber field as the first or last
table
field,
... only if I remove the other 4 SkipColumn = True fields from the import
spec.
If this doesn't fix the problem,
...Yes & No; the fields in my imported text files will not always be
consistant;
...which is why I set the spec to include all 12 fields thinking that each
...could be toggled on/off thru the SkipColumn field. I now realize that
...that the SkipColumn applies to the text file fields not import spec
fields.
then I request that you post the table's structure,
... | RFPid: AutoNumber | RFPdoc: Text | RFPnum: Text | RFPsort: Text
... | RFPsec: Text | RFPpara: Memo | Annotation: Memo | Response: Memo
... | Compliance: Text | Risk: Text | UpdateBy: Text | UpdateWhen:
Date/Time
a few sample rows of data from the text file,
... "RFPdoc", "RFPnum", "RFPsec", "RFPpara"
... "SOW", "1.1.2", "Introduction", "The solution shall provide an
improved
widget."
... "SOW", "1.1.2", "Introduction", "The soultion shall reduce cycle
time."
... "SOW", "1.3", "System Architecture", " The current system should be
replaced."
... "L", "2.4", "Proposal Submital", "Submitted documents shall
include..."
... "L", "2.5", "Submital Formats", "The page margins should not exceed 1
inch."
and the details of the import specification.
... MSysIMEXSpecs:
... | DateDelim=/ | DateFourDigitYear=-1 | DateLeadingZeros=-1
... | DateOrder=2 | DecimalPoint=. | FieldSepartor=, | FileType=437
... | SpecID=34 | SpecName=RFPSpecs | SpecType=1 |StartRow=1
... | TextDelim=: |TimeDelim=:
... MSysIMEXColumns:
... Attributes|DataType|FieldName|IndexType|SkipColumn|SpecID|Start|Width|
... 0 |4 |RFPid |1 |-1
|34 |1 |11
... 0 |10 |RFPdoc |0 |0
|34 |12 |10
... 0 |10 |RFPnum |1 |0
|34 |22 |25
... 0 |10 |RFPsort |0 |-1
|34 |26 |3
... 0 |10 |RFPsec |0 |0
|34 |28 |255
... 0 |10 |RFPpara |0 |0
|34 |278 |32000
... 0 |10 |Annotation |0 |-1
|34 |391 |32000
... 0 |10 |Response |0 |-1
|34 |504 |32000
... 0 |10 |Comply |0 |-1
|34 |617 |10
... 0 |10 |Risk |0 |-1
|34 |627 |5
... 0 |10 |UpdateBy |0 |-1
|34 |702 |30
... 0 |8 |UpdateWhen|0 |-1
|34 |732 |19
That will help us to see where discrepancy might sit.
... I have an editable parent\child subform based on the above two tables.
... The child form also has an [MSysIMEXColumns].[Import] checkbox field.
... The parent form also has an Import button that is intended to feed
user-
... selected values to the DoCmd.TransferText variable parameters.
I assure you that an import specification argument will not depend upon
whether you use an actual string text or you use a variable that contains
that string text.
... Agreed, there was nothing wrong with my line of code that produced the
... error. I was mislead in thinking so because the hard-coded spec
parameter
... oddly worked prior to compacting and resetting the autonumber seed.
... I'm thinking this theory will still work with the addition of
programatically building
... each import spec on-the-fly; as opposed to using default specs based
on
the
... entire import table fields? or is there an easier way to go about it?