Microsoft Access 302
Advanced Access Development
Product Table & Form, Select
Product From Combo Box, Column Property, GoToRecord, DLOOKUP, Error
Handling, More. 67 Minutes.
- Product Table,
Form, Combo Box
- Select Products
- Combo Box Column
- DLOOKUP Function
- Basic Error
Access 302 continues our advanced Access
database development with VBA programming. We continue work on our sales
and order-entry system.
First we'll make a Product table and form so we can
pick from a list of products when making an order. We'll learn how to deal with
products that are non-taxable, or perhaps taxed at a different rate than normal
(for example, clothes in NY state have a different tax rate than most products).
Next we'll make a combo box to list all of our
products so that we can select a product when making an order. We'll put
this in the footer section of our Order Details subform.
We will then create a command button that we can
click on to get the data out of the combo box and put it up into the order
details. You will learn how to use the Column property of a combo box.
You will learn how to move the focus to a new
record in VB code, and how to set a field value. You will learn how to get
data from multiple columns in the combo box.
As great as combo box columns are, you can't use them for
everything. Next you'll learn about a powerful function called DLOOKUP
that you can use to retrieve ANY values from ANY tables or queries in your
When we're finished with this lesson, we'll have added
much more functionality to our order-entry system by allowing the user to select
the product from a list of products instead of just typing it into the order.