Change ODBC connection from front end

I need to create a form that will populate a combo box with a list of all of the available ODBC connections (read from the system).
Selecting one will connect the front end to that database and update all of the linked tables to the ODBC connection.

Where would I even begin to create such a form??!!!
Who is Participating?
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
user dsn are stored in the registry

HKEY_CURRENT_USER\Software\Odbc\Odbc.ini\Odbc Data sources
Rey Obrero (Capricorn1)Commented:
the systems dsn files are stored in
C:\Program Files\Common Files\ODBC\Data Sources

the dsn files can be open using notepad

is this what you are after?
fuerteventuraAuthor Commented:
Thanks for your reply, what I need is a way of populating a combo box with all the available ODBC data sources (user DSN). I then need to be able to select them and update all my linked tables to this connection.
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:

You can load filenames into a listbox by using this:

I have seen this in a recent post here as well:
(You need to set a VBA reference to the Micrisoft Scripting Library)
Private Sub Form_Load()
Dim fso As New IWshRuntimeLibrary.FileSystemObject
Dim fld As Folder
Dim fil As File
Me.lstFiles.RowSource = ""
Set fld = fso.GetFolder(gstrMediaFolder)
For Each fil In fld.Files
    Me.lstFiles.AddItem fil.Name
Next fil
End Sub

Hope this helps as well

fuerteventuraAuthor Commented:
Thanks to all who helped
All Courses

From novice to tech pro — start learning today.