Home Fees/Services Access Examples Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Combo Box
List Box, Lookup Lists,
Dropdown List VBA Examples
Include Multiple Fields in DropDown List

 Programming Tutorials > Combo Box > Fill In Other Form Fields



Best Way to Fill Form Field
Combo Box: All/Any
Dependent Combo Box
Fill In Other Form Fields
Lookup List-Correct Way
Lookup Lists in One Table
Speed up Combo Boxes
Table-based Combo Box
Yes/no Drop Down List


Populate Two Form Fields From Drop Down List

Using a Second Field From a Lookup List/Drop Down List Box

Let's expand a previous example drop down list example and suppose that we have account numbers associated with each shipping method and that these account numbers (for whatever reason) can change over time.

Therefore we want to capture the current account number in the widget shipping record. Here is how the combo box looks in operation:

 Populate Multiple Field Drop Down List

Now I bet you want to know how I got the account number to jump from the drop down list over to the account field.

New! Download Access example of Filling Data Fields From Combo Box.

It is fairly easy - add an Event Procedure to the After Update event trigger of the combo box. Here are the lines of code that go into the procedure:

 Access Multi-Field Drop Down List Techniques

The only line that you actually have to type is the one starting with Me...  Note that Column(2) contains the account number in the combo box.  Combo boxes start counting fields at zero.  The actual fields are: Shipping_Method_ID; Shipping_Method; Account.

Don't miss our tutorial downloads for additional help with combo boxes.

Contact Information

Custom Software Development
Microsoft Access 2003 2000 2002(XP) 97 All Windows Versions