Get filename during Import Wizard.

  • Thread starter Thread starter bhammer
  • Start date Start date
B

bhammer

The user clicks a button to launch the GetExternalData wizard,
DoCmd.RunCommand (acCmdImport)
then browses to a text file and selects a destination table, etc.

I want to display the import filename and the destination table that the
user selected during the wizard, in text boxes on the form, so that I can
have the user verify prior to running an update query. How?
 
On Wed, 7 Jan 2009 15:52:06 -0800, bhammer

I don't think that's possible. You may need to replicate the work of
the wizard yourself. DoCmd.TransferText can do most of the work of
actually importing the data, and this link shows how to work with a
File/Open dialog: http://www.mvps.org/access/api/api0001.htm

-Tom.
Microsoft Access MVP
 
Thanks, Tom & Mike.

Behind the command button I used first the API Open/Save File dialog, which
gave me the path and filename, then used the TransferText method to update
the table (same one every time) with the plain text file (same format every
time). Just what I needed.

Thank you.
 
Back
Top