ms-access


DoCmd.TransferText import issues


I'm attempting to set up an automated import of a number of CSV files into Access. I've simplified my base code below. Normally the FileName would be populated via a loop on another table, but I've removed it for simplicities sake here.
FileName = "IDP-FOR-DOTCM-OMNI-INS-V-AS400"
DoCmd.TransferText acImportDelim, "", "RAW", "\\CS-FS-prod\CSWFMGroup\Tools\Data\IDP\" & FileName & ".csv", True, ""
When I run the code 29 of the 30 files import successfully without issue, however one file incorrectly removes the decimals from the last column SL unless it has a decimal in the first record that contains data (5th record down below).
Note I've changed the column names to shorten them and I removed some of the null results at the start (there is one for each 30 minute interval of the day) normally where there are no results, it will appear as it does on lines 2-5. I removed as I didn't believe it to be important/ is in the way here.
"F1","CODE","START","STOP","HR","MIN","Vol","AHT","SL"
,"ABC",5/7/2017,5/8/2017,,,,,
,"ABC",5/7/2017,5/8/2017,,,,,
,"ABC",5/7/2017,5/8/2017,,,,,
,"ABC",5/7/2017,5/8/2017,9,30,1,409.22,0
,"ABC",5/7/2017,5/8/2017,10,0,1,418.61,50
,"ABC",5/7/2017,5/8/2017,10,30,1,431.29,50
,"ABC",5/7/2017,5/8/2017,11,0,1,462.51,90.9
,"ABC",5/7/2017,5/8/2017,11,30,1,518.07,45.45
I've seen methods of using saved imports with the DoCmd.TransferText in order to successfully upload data, but where I am not always using the same file name (Populated via another table), I'm not sure I could get this to work. In fact doing this method directly on one table will work for a successful import, but won't fit my needs.
Any other suggestions? Something I'm missing, or maybe another method that I could use to import?
Thank you!


Related Links

Use variable to SELECT records in a recordset
Microsoft Access 2010: ComboBox text extraction / search
“Couldn't find Instalable ISAM” VB6 Data Control to Access DB
Replace Keywords
Access Navigation Control BrowseTo "The command or action 'BrowseTo' isn't available now. Error 2046
Add a record (that does not already exist) to a table from a userform
Access 2010 report invoice total
linked table xxx is unavailable. Microsoft access cannot contact the server
Does this Dlookup have incorrect syntax?
How to combine two fields in Form to one field from Microsoft Access?
Report building from selection in datasheet
Multiple arguments IsNull function MS Access VBA
how to pass parameters to ExportWithFormatting using vbscript
Access 2010 cascading combo boxes runtime error 424
Access Month Calendar View
Shapefile to MDB with custom field structure [duplicate]

Categories

HOME
compiler-construction
osgi
variables
hive
relative-path
raspberry-pi
read-eval-print-loop
xmpp
q
maven-3
twitter-bootstrap-4
google-project-tango
reveal.js
windows-azure-storage
visual-studio-2005
pythonanywhere
samoa
nodatime
predix
visjs
graphicsmagick
smb
facebook-access-token
bootstrap-material-design
phonegap
twilio-api
airconsole
catch-all
windows-dev-center
host
espeak
dynamic-reports
arena-simulation
s
sencha-touch-2.3
hibernate-tools
qsslsocket
elgg
nativeapplication
tactic
typed-lambda-calculus
python-cryptography
webdriverjs
smart-table
mediaelement
mathematica-frontend
xml-attribute
impresspages
ready-api
freedesktop.org
intel-fortran
jmeter-maven-plugin
php-ci
method-parameters
web-controls
e10s
jsonpickle
gadt
applescript-objc
internet-connection
html-helper
xojo
castle
htmlcleaner
meteor-velocity
mbr
viadeo
ms-project-server-2010
yui-compressor
runas
labwindows
netdna-api
libc++
blackberry-playbook
actionview
lang
lpeg
fixed-width
substrings
privilege
defensive-programming
ajax-forms





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm