This example illustrates populating a combo box from the Pubs database, the sample database included with all versions of Microsoft SQL Server, using an ODBC connection. The Pubs database contains an Authors table. The combo box will be populated with the author names (last name, first name). The result is a form that displays as shown below:

The procedure is similar to the previous example, populating a combo box from a Microsoft Access database. We need to set up an ODBC connection to SQL Server, refer to it in the BASIC+ XOInstance() function, change the SQL Select statement to retrieve the correct data, and modify the form's GUI.

  • No labels