S
starlore
I need to import a comma-delimited text file saved from a Word form
into an Access table. The problem is that all the number fields, even
though marked as number fields on the form, are saved as text strings
in the text file. When I try to parse and convert them into the
appropriate number types (long, double, integer), I am consistently
getting a "type mismatch" error. For example, the string "1504" won't
convert to a long data type. I have tried the following code to make
this work with no success (varValue(i) being the string "1504"):
varValue(i) = cLng(varValue(i))
lngValue = cLng(varValue(i))
Am I overlooking something obvious? TIA for any help with this.
into an Access table. The problem is that all the number fields, even
though marked as number fields on the form, are saved as text strings
in the text file. When I try to parse and convert them into the
appropriate number types (long, double, integer), I am consistently
getting a "type mismatch" error. For example, the string "1504" won't
convert to a long data type. I have tried the following code to make
this work with no success (varValue(i) being the string "1504"):
varValue(i) = cLng(varValue(i))
lngValue = cLng(varValue(i))
Am I overlooking something obvious? TIA for any help with this.