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.

The following sections show how to use the orders form and how to program it. The object names are provided so you can easily examine them in the ­Northwind 2.0 Starter Edition database.

The following information summarizes important points about using the form:

  • The Main Menu (frmMainMenu) has a list of orders, a few filter options, and hyperlinks to open each order.

  • Click the Add Order button to open a new blank order.

  • On the order details form (frmOrderDetails), select an existing customer from the dropdown. At that point your Employee name and the New status are selected. The Order Date is already filled in as well. Leave the Shipped Date and Paid Date blank for now.

  • To add an order for a new customer, create the Customer record before opening the order details form (frmOrderDetails).

  • To add items to an order, select a Product for this order and then enter Quantity. Unit Price is filled in, and the Price is calculated by an expression.

  • To advance the Order Status and move the order through the workflow from New —> Invoiced —> Shipped —> Closed, use the buttons at the top of the order details form (frmOrderDetails).

  • Unshipped orders can be deleted by using the Delete Order button.

  • The order process in Northwind 2.0 Starter Edition is straightforward by design. The assumption is that there is always inventory available, it never runs out, and never has to be purchased. A more realistic process would deal with these common issues.

The following information summarizes important points about how the form was developed.

  • The order details form (frmOrderDetails) gets its data from a simple query (qryOrder) specified in the RecordSource property of the form. Basing a data entry form on a single table query is a recommended practice. Note that it is not needed to include the OrderDetails table in this query.

  • The various ID fields get their values from two-column combo boxes: a hidden ID column and a visible Description column. These combo boxes are bound to two-column queries specified in the RowSource property.

  • The subform, sfrmOrderDetails, is bound to a single table query. The ProductID dropdown works like other ID dropdowns. The subform’s rows are limited to the current order by setting the LinkMasterFields and LinkChildFields  properties of the subform control.

  • This form also has a BeforeInsert macro which runs when a new record is being created, and it sets the Employee and Status. Typically, this occurs when you select a customer. TempVars!UserID holds the UserID of the logged-in user captured from the frmLogin form. Note that these macros are not in the Macros section of the Navigation Pane, but in the Events tab of the Properties window.

  • This form’s AfterInsert event has a macro which runs when the new record is saved. It then updates the counts in the main menu’s left navigation pane.

See Also

Northwind 2.0 Starter Edition

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!

×