File Name Argument

K

Kirk P.

I'm trying to import a text file, with the path chosen by the user. The file
name argument is a function (TestIt2) that allows the user to browse for the
file.

DoCmd.TransferText acImportDelim, "", "tblData", TestIt2(), True, ""

When I run the code, I get the appropriate window to browse for the file,
but when I file is selected I get a "action or method requires a file name
argument" I've tried =TestIt2, but no luck. Help!
 
K

Ken Snell \(MVP\)

Chances are that the TestIt2 function is returning just the file name? It
needs to return the entire path and filename, and be sure that it returns
this value as a string.
 
K

Kirk P.

You are right - it was a problem with the function. I found it and fixed it.
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top