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

Importing And Renaming DBF in Access

Status
Not open for further replies.

yukonjack

MIS
Jun 11, 2003
12
0
0
US
Hello all,

What I am looking to do is have a button that opens a Common Dialog box to import a dbf as a table once it is imported I wanted it automaticly renamed to specific name. Any help would be appreciated.

 
You can't import a .Dbf file. That IS the database. You can import the tables from a .dbf file though.
 
Well, you certainly can import a .dbf file, I do it all the time--each table is contained in its own file.

If this is something you do regularly, from the same .dbf file, you could link to the file and build a make-table query. This, of course, will overwrite the table in your database with that same name, if there already is one.

Oh, but you want to use the common dialog, so it's probably not the same file every time, or the same name...I don't know of a simple way to do it, but I would think you could write code to import the file, check to see whether there is more than one table with that name (or use msysobjects to grab the one with that name that was created latest) and rename the table.

Sound reasonable?

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top