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

Retrieve Table Names From Remote Access Database 1

Status
Not open for further replies.

Accel45

Technical User
Jul 7, 2004
83
0
0
US
I located this code which was posted by Allen Browne - Microsoft MVP.

SELECT MSysObjects.[Name] FROM MSysObjects IN 'C:\MyFolder\MyFile.mdb' WHERE (MSysObjects.[Type] = 1) AND NOT ((MSysObjects.[Name] Like "~*") OR (MSysObjects.[Name] Like "MSys*")) ORDER BY MSysObjects.[Name];

I’m using the code as the Row Source for a combo box on a MS Access form:

I would like to modify it to be able to get the remote database path 'C:\MyFolder\MyFile.mdb' from a text box “txtSource” on the form. I have not been able to get the syntax correct to accomplish this.

Any help would be appreciated.

Thank you

Accel45
 
In the GotFocus event procedure of the combo:
Code:
Me![name of combo].RowSource = "SELECT [Name] FROM MSysObjects IN '" & Me!txtSource & "'" _
 & " WHERE [Type]=1 AND NOT ([Name] Like '~*' OR [Name] Like 'MSys*') ORDER BY 1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That did the trick, Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top