This launches the Class Designer. This class will have a method for getting the inventory information. To add the method, choose New Method from the Class menu. The methods of the class become the methods of the COM component. Type GetUnits as the name of the method.
Type Find the number units of a particular product in a particular store as the description.
Choose Add to add the method and then click Close to close the dialog box. Double-click on the class to bring forward the Code window. Choose GetUnits from the Procedure drop-down list. Type the following code in the GetUnits method. This code first connects to an ODBC data source that points to an Access database.