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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File import, warning table already exists. How?

Status
Not open for further replies.

NDK

MIS
Jan 4, 2006
8
US
Hello all,
Using VBA, I'm importing a .txt file into a table the name of which is derived from part of the .txt file name. I want to warn the user if a table of that name already exists.
How do I inspect the current database for an existing table of the same name?

Many thanks,
ND
 
Consider this:-

Go straight ahead and do the create action and trap the error that will be generated if it exists already, then in the Error routine do your "Warn the User" bit.

G LS
 

See faq181-36 Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
 
Thanks to you both for your suggestions.
Being a lazy person, I opted for the FAQ's function which works like a dream, without modification.

I shall inspect the FAQ more thoroughly in future ;)
Wish I'd found this site earlier.

Cheers,
ND
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top