How to Create an Access Order Form with Products and Quantities
Question details
The user needs to create an order-entry system in Microsoft Access that displays available products and allows users to enter quantities without manually typing the product names.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Building an order-entry database system utilizing separate tables for Orders, Products, and Order Details.
- Observed behavior
- Requires a streamlined form interface where all products can be quickly populated for a specific order to allow fast quantity entry.
Ensure you have successfully created your primary tables (Products, Orders, and Order Details) and established the correct primary key relationships in the Database Tools before building your forms.
Use an Append Query to Populate Products in a Subform
The most efficient way to handle orders without manually typing names is to insert all products into the Order Details table for the current order, allowing the user to simply input quantities.
By binding your main form to the Orders table and the subform to the Order Details table, you can use a simple SQL command to bridge the two. This method instantly generates a line item for every available product on the current order.
Bind the main form's Record Source to your 'Orders' table, and set your subform's Record Source to the 'Order Details' table.
Open the main form in Design View and add a Command Button from the Form Design controls. Name it 'Add All Products'.
In the button's On Click event, write a VBA execution command or macro to run an append query: INSERT INTO tblOrderDetails (ProductID, OrderID) SELECT ProductID, [Forms]![frmOrder]![OrderID] FROM tblProducts;
Immediately following the SQL execution code, add a requery command (e.g., Me.YourSubformName.Requery). This refreshes the view so the newly added products appear on screen.
Switch to Form View. Click the button to populate the list, then click into the Quantity column on the subform to type the ordered amounts.

Use a List Box for Specific Product Selection
If you have a massive product catalog, inserting all products might clutter the screen. Instead, allow users to select multiple specific products from a list box to add to the order.
Simplify Order Forms with WPS Office
While WPS Office does not include a complex database tool like Microsoft Access, it offers a robust, highly compatible suite for Excel, Word, and PowerPoint alternatives. For many businesses, building a simple order form in WPS Spreadsheet is far easier and lighter than managing relational databases.
- 1. Download WPS Office: Visit the official WPS website and download the free office suite for Windows, Mac, or Linux.
- 2. Open a Spreadsheet: Launch WPS Spreadsheet to start building an order form with easy-to-use grid layouts and formatting.
- 3. Use Data Validation: Create a drop-down list of your products using Data Validation, allowing fast data entry without database queries.
- 4. Save in Excel Format: Save your finished order form as an .xlsx file, ensuring anyone using Microsoft Excel can open and use it flawlessly.

Frequently Asked Questions
Can I use Microsoft Excel instead of Access for an order form?
Yes, for smaller businesses or simpler setups, a spreadsheet program like Microsoft Excel or WPS Spreadsheet is often easier. You can use data validation dropdowns and VLOOKUP functions to manage product catalogs and calculate totals without writing complex VBA code.
How do I prevent zero-quantity products from saving in the Access order?
You can write a Delete query that triggers on the form's 'On Close' event or via a dedicated 'Save Order' button. The query should delete records from tblOrderDetails where the OrderID matches the current order and the Quantity field is 0 or Null.
Why isn't my subform updating after I click the Add Products button?
The subform must be requeried to fetch and display the newly inserted database records. Ensure your VBA code includes a line like Me.YourSubformControlName.Requery immediately after the SQL INSERT statement executes.




