Importing a CSV file in my database

I use the following code to import a csv file into my database:

Private Sub cmdImport_Click()
On Error GoTo Err_cmdImport_Click:
Dim dbs As Database
Dim strSQL As String

DoCmd.SetWarnings False

Set dbs = CurrentDb

DoCmd.TransferText acExportDelim, "DelimWO-1", "tblImported", "C:\Users\AllPC\Downloads\Service-requests-08-22-18"

Exit Sub
Err_cmdImport_Click:
MsgBox Err & " " & Err.Description
End Sub

The table tblImported is already created (otherwise I get an error that it cant find it!)

When I run the program I get: 3027 Cannot Update.  Database Object is Read-Only.  I tested the table tblImported and it is NOT read-only

Any ideas?
Biggles1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
TransferText with the acExportDelim argument will EXPORT your data, not IMPORT it. Your expression would export data from a table named tblImported to a file at the address in that last argument (which is not properly formed - you should have a filename at the end).
0
PatHartmanCommented:
Try typing
DoCmd.TransferText

And the intellisense should help you compose the rest of the statement  Choose acImportDelim to get you on the right path.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Biggles1Author Commented:
I realize my typo: It should have been acImportDelim
0
Biggles1Author Commented:
Jo Winograd gave me some extensive answers.  Now I cant find them!  Please help.
0
PatHartmanCommented:
I'm not sure how we can help with this.  If you look in your profile, you should be able to see all the questions you asked.  Where the answers in some question you asked?  If not, try pinging Jo but ypu'll have to provide more detail since I'm sure she answers lots of questions.

New questions should be started in new threads.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.