Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Import

Status
Not open for further replies.

jeff1

IS-IT--Management
Nov 8, 2000
49
US
I have created a simple macro that imports a space delimited file. How can I modify the macro to ask what file you want to import each time that the macro is run, the file name and path will be different each time.


Thanks to all

Jeff
 
Hi!

dim strPath as string
strPath = "C:\MyLocation\MyTableDelimData.txt"
DoCmd.TransferText acImportDelim, "MyTable Import Specification", "MyTable", strPath

Aivars
 
MyFile = InputBox([MyMessage], "Please enter the name of the file..etc")

And then use the MyFile variable to build up your string.
Store300

Store300@ftnetwork.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top