Get filename during Import Wizard.

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?
 
T

Tom van Stiphout

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
 
B

bhammer

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.
 

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