Import csv into Access, 2391 error (1 Viewer)

Lifeseeker

Registered User.
Local time
Today, 10:40
Joined
Mar 18, 2011
Messages
273
Hi there,

I'm simply trying to import a csv file into Access regularly using this code

Code:
Sub Command0_Click()
'import from text file
DoCmd.TransferText acImportDelim, , "test", "M:\testR.csv", "-1"

End Sub

The error I'm getting is attached in the word doc. I have no idea what that weird symbol references...

Can someone help? Much appreciated
 

Attachments

You need to specify an import specification and the "-1" should just be -1 or True

To specify an import specification, go to External data>text file and start to follow the prompts, then click on the advanced button to open this form.
attachment.php

Once you have the specs as required, click on save as and give it a name
 

Attachments

  • Capture.JPG
    Capture.JPG
    54 KB · Views: 935

Users who are viewing this thread

Back
Top Bottom