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.
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.
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.