From:       To:      
Home > Documentation > MS Access to MySQL

Microsoft Access as a Front-end to MySQL

For years many companies and organizations used Microsoft Access for database management. This DBMS allows efficient retrieval and processing the data. Also, it provides an easy-to-use interface to create tables, define fields, data types and indexes making it accessible to even newbie developers. Finally, MS Access includes unique query builder that allows to design complex queries without extensive SQL knowledge.

Modern it infrastructure applies advanced requirements to database management system that MS Access cannot meet. Many organizations and companies migrate their databases to more powerful DBMS due to the following limitations of MS Access:

On the other hand, MS Access combines user-friendly interface, tight integration with Office applications and powerful development environment known as Visual Basic for Applications (VBA). At the same time, the product supports linking to external data sources that makes it ideal Front-end for many advanced DBMS such as MySQL.

To use Microsoft Access as a front-end to MySQL it is required to create linked tables in MS Access database to existing tables in MySQL database. When a query is run against MS Access linked tables, the corresponding ODBC driver will execute the same query on the target MySQL database.

Follow these steps to create linked table in MS Access:

After completing those steps, MS Access connects to the specified MySQL database and lists the tables to link. Choose individual tables or click 'Select All'. If the source MS Access database already has a table with the same name as the linked one, MS Access appends numeric suffix to the linked table name.

If MS Access displays no tables to select, it might be caused by the fact you did not specify the target database when defining DSN properties. To fix the issue, reconfigure the DSN providing the database to connect to (see Create a Connector/ODBC DSN section for details), or choose a database when you log in to the DSN.

If Microsoft Access is failed to recognize primary key for a table automatically, it will ask you to choose a column (or a combination of columns) to be used as unique identifier for each row from the source table. Now you can use MS Access interfaces and build queries to the linked tables just as you would for any native tables.

Create a Connector/ODBC DSN

Windows provides ODBC Data Source Administrator tool to create DSN and check ODBC driver installation. Here are the steps to create and configure a DSN using this tool:

Click 'Test' button to verify the connection using the specified parameters. If the connection succeeds, you will see the 'Connection Successful' dialog. Otherwise, 'Connection Failed' dialog window will appear.