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

need to list table names from different database

Status
Not open for further replies.

jospe1

Programmer
Oct 9, 2002
4
US
Im working on an import form that will allow the user to import any table from any database that they select. I need to populate a combo box with the table names from the database they select. I have a function that populates a combo box with the table names of the database that you are working in. It uses the "set db = currentdb" function, can i use that same line of code but set it to a different database? Any other suggestions on how to do this are much appreciated.
 
Hi,

Looks like you are using DAO and not ADO. Your Set database will have to reference another database probably using the...
Code:
Set dbs = Workspaces(0).OpenDatabase(...)
Hope this helps :) Skip,
Skip@TheOfficeExperts.com
 
thanks for the reply Skip. I did a little more research and found a solution.

set db = opendatabase(strSource)

strSource is a variable that contains the path to the database.

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top