By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,716 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,716 IT Pros & Developers. It's quick & easy.

Executing Import Wizard via code

P: n/a
Hi all.

I'm trying to enhance the functionality of an MS Access application.

I want to give the user the capability to import a MS Access or MS
Excel table into the application *without* having to execute the Import
Wizard herself.

Q1:
So i'm basically looking for the VBA statement that will invoke the
Import Wizard (the equivalent of right-clicking in Tables view and
choosing: Import).

Q2:
Is there a way to capture the name of the table that's being imported?
I will need to append it to another one once the user has imported it.

If not, i was thinking to simply capture all the table names before the
user starts the Import Wizard and after he's done so, so the difference
would give me the name of the newly imported table.

Many thanks for your help,
Alex

Sep 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
alex.hatzisavas wrote:
Q1:
So i'm basically looking for the VBA statement that will invoke the
Import Wizard (the equivalent of right-clicking in Tables view and
choosing: Import).
RunCommand acCmdImport
Q2:
Is there a way to capture the name of the table that's being imported?
No. Not with the wizard.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200609/1

Sep 28 '06 #2

P: n/a
Rolling your own would not be difficult and gives you better control.

Use the Windows open dialog to locate the file
Use ADOX to get the list of tables to display in a listbox
When the user selects the table
Get them to enter the local name (you know all the existing table &
query names so you can disallow any clashes)
Import the table

Should take about a day to do I would have thought.

You can then either use this in the db or create a library or wizard to make
it a bit more polished and re-usable.
--

Terry Kreft
"alex.hatzisavas" <al*************@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Hi all.

I'm trying to enhance the functionality of an MS Access application.

I want to give the user the capability to import a MS Access or MS
Excel table into the application *without* having to execute the Import
Wizard herself.

Q1:
So i'm basically looking for the VBA statement that will invoke the
Import Wizard (the equivalent of right-clicking in Tables view and
choosing: Import).

Q2:
Is there a way to capture the name of the table that's being imported?
I will need to append it to another one once the user has imported it.

If not, i was thinking to simply capture all the table names before the
user starts the Import Wizard and after he's done so, so the difference
would give me the name of the newly imported table.

Many thanks for your help,
Alex

Oct 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.