These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Friday, April 15, 2011

VBA and MySQL - Recipe Manager

As an intern this summer at Zions Bancorporation, I will be using SQL databases to extract and report banking data for affiliate banks.  Because of this, I decided on a project that would allow me to learn how VBA can interact with an SQL database.

My project was to create a recipe manager that would store all of the recipe data in a MySQL database.  The program allows users to add, search for, edit, delete, view, and print recipes through VBA forms.

The code is housed within a single module and four forms.  The module contains database connection information and other global functions and variables.  The four forms control searching for, adding, editing, deleting, printing, and viewing recipes.

If users would like to set up their own recipe database, four steps must be followed:

  •  Install or get access to a MySQL database
  • Install ODBC driver
  • Set up reference to Microsoft ActiveX Data Objects Library
  • Set up ADODB connection to connect to MySQL database

Details for each of these steps can be found in the following write-up.

Here are the links for the code and the write-up:

  • Code:
  • Write-up:

No comments:

Post a Comment

Blog Archive