Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Select any topic below to learn more about Products in the Northwind Developer Edition.   

Northwind 2.0 Developer Edition, Products includes a list form and detail form. 

  • To display the Product List, select Products on the ribbon.

  • To view the Product Detail, select Product ID from the Product List.

To view the status of a product use Product List features: 

  • Products with low inventory are highlighted in yellow.

  • Discontinued products are shaded.

  • Add Product button opens a new blank Product Detail form.

  • Hyperlinks access the Product Detail form. Select a Product ID to view the Product Detail.

The Products List and the Product Detail form both display inventory information. Learn more in the Inventory topic.   


frmProductList

Conditional formatting is used to highlight low product counts and to shade discontinued Products.


frmProductDetail

  • Product Detail record source is a simple one-table query on Products.

  • A combo box labeled “Go to Product” that runs the VBA procedure cboFindProduct_AfterUpdate to navigate to the selected record.

  • VBA Sub Calculate Levels illustrates re-use of custom Functions and existing queries to set quantity textboxes (Qty Available, Qty Allocated, etc.), ensuring uniformity of the calculations throughout the application. 

  • Sub-forms on the tab control feature lazy loading, meaning they are loaded only after the tab is clicked. This allows the Product Detail form to load faster, since subforms aren’t loaded when the form opens. 

  • VBA sub ControlStates sets control properties depending on data values in the current record:

    • Visibility of the Reorder Product and Delete Product buttons, and Orders and Purchase Orders tabs.

    • Highlighting Qty to Reorder and its label (compare to conditional formatting).

    • Form caption (what displays in the tab at the top of the form).

    • Field highlighting for missing data in required fields using Form Validation.

  • Uses Form Validation as explained in the Orders article within the Programming section.  

  • The form is designed to resize gracefully, using Anchoring: As the form is resized within the application, certain controls are set to anchor, and others to expand to fill the screen. 

  • Equivalent Syntax: VBA often allows alternate syntax to accomplish the same task. Uncomment and run each in turn to observe that they do the same thing.  

  • Command button Reorder Product (event cmdReorderProduct_Click ) invokes a series of business rules to determine what happens next: 
    ScreenCap

    • Identifying the vendor for the purchase order

    • Appending a new line to an existing open purchase order, or creating a new purchase order

    • Setting a default reorder quantity

  • Adjunct form frmDlgVendorPrompt is called from the cmdReorderProduct_Click event, to prompt users to choose a vendor if the product has multiple vendors and none has an existing open purchase order. Its features include:

    • The default property for the form’s “OK” button, cmdOK, is set to “Yes.” This causes it to be activated when a user taps the Enter key.

    • The form’s “Cancel” button, cmdCancel, has its Cancel property set to “Yes.” This means it is activated when the user taps the Esc key.

    • The form is called using acDialog Window Mode. This ensures that users cannot interact with other forms while the form in dialog mode is open, and that VBA code running in the calling procedure will stop until the dialog is hidden or dismissed. 

    • If canceled, frmDlgVendorPrompt closes, and the frmProductDetail procedure cmdReorderProduct_Click reactivates, then exits.

  • If a Vendor is selected, frmDlgVendorPrompt hides itself. This allows code to progress in the calling procedure in frmProductDetail, which reads the value of the Vendor selection on the (now hidden) frmDlgVendorPrompt, then closes the form and proceeds to create a new Purchase Order for the identified Vendor.
    '

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×