469,648 Members | 1,124 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Executing Import Wizard via code

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
2 4437
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
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.

Similar topics

reply views Thread by Bob | last post: by
2 posts views Thread by David Berry | last post: by
2 posts views Thread by pendell | last post: by
2 posts views Thread by krishna.000.k | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.