Importing csv file into Back End MS Access database

I am using Access 2010.

I have 2 databases, one is the back end that is used to store all the data. The other as a front end which has forms for the user to interact with.

I wish to set up a form where the user clicks a button and prompts the user to select a file and the data will get imported into the back end database, which is not opened.

I am able to do import the file into the front end database, but need help getting to import to the back end.

I get this error on the DoCmd.TransferText line.

"Run-time error '438'.  Object doesn't support this property or method."

Below is my code:

Private Sub cmdPSFT_Click()
DoCmd.SetWarnings False
Dim fd As Object
Dim txtDB As String
Dim strFile, strTable, strDir As String
Dim appAccess As Object

strDir = "Y:\Schedule F\"
strTable = "tblLedger"
txtDB = "Y:\Schedule_F\SchF Testing.accdb"
Set fd = Application.FileDialog(3)
Set appAccess = CreateObject("Access.Application")
With fd
    .InitialFileName = strDir
    .AllowMultiSelect = False
    .Filters.Clear
    .Filters.Add "csv files", "*.csv", 1
    strFile = .SelectedItems(1)
End With

With appAccess
    .Visible = False
    .OpenCurrentDatabase txtDB, True
    .DoCmdTransferText acImportDelim, "PSFT_Specs", _
         strTable, strFile, True
End With
DoCmd.SetWarnings True
Set fd = Nothing

End Sub

Thanks for any help.
mak345Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Rey Obrero (Capricorn1)Commented:
you missed a "dot" after docmd.transfertext


  .DoCmd.TransferText acImportDelim, "PSFT_Specs", _
         strTable, strFile, True
Rey Obrero (Capricorn1)Commented:
you missed a "dot" after docmd

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
mak345Author Commented:
Thanks.
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.