Import SELECTED text file

kschuster

New member
Local time
Today, 17:45
Joined
May 4, 2004
Messages
3
I tried the Macro route and came to a screeching halt when asked for the file name.

I think I need to use code instead of macro - looking for help.

Knowns
1. Import Fixed Width
2. Specification Name
3. Table Name

How would I code this to use the Specification already created and PROMPT the user to BROWSE for the text file.

Thanks
Keith
 
Some time ago, Pat Hartman posted something related to the OpenFile Dialog routine, which brings up the Common Dialog box related to opening files. A forum search should find that pretty easily. It is also in the MS knowledge base. You get back a fully qualified file specification from this routine.

Look up the help associated with DoCmd.TransferText to see its arguments in VBA, which should tell you what to do in that case. Obviously the output of the OpenFile Dialog is input to the transfer text operation.
 

Users who are viewing this thread

Back
Top Bottom