Selecting option from a drop down menu and populating form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Al

This question has probably been asked a million times before but...

I have a form that i have a can select a course ID No from eg. WORD001 from a combo box. I would like to be able to select this option and have a field where the CourseDescription would update itself with the relevant course

For some reason i have set up the Course Description as a combo box when setting up the tables so at the minute i have to select the relevant course from a drop down box

I'm not entirely sure how i can change it so that when i select the course no the description will self populate

Any help would be appreciate

Thank

Carolm
 
Here is a KB link that should be helpful to you:

ACC2000: How to Populate Text Boxes with Multicolumn Combo Box Selections
http://support.microsoft.com/default.aspx?scid=kb;en-us;322900#appliesto

If you are using Access 97 or 2002, this article contains links to using
this technique with those versions.

--

Cheryl Fischer, MVP Microsoft Access



carolm said:
Hi All

This question has probably been asked a million times before but....

I have a form that i have a can select a course ID No from eg. WORD001
from a combo box. I would like to be able to select this option and have a
field where the CourseDescription would update itself with the relevant
course.
For some reason i have set up the Course Description as a combo box when
setting up the tables so at the minute i have to select the relevant course
from a drop down box.
I'm not entirely sure how i can change it so that when i select the course
no the description will self populate.
 
Carolm

If I understand what you are trying to do, you'd like a control (field) on
your form to display the course description of a course you select in a
combo box.

If so, first be sure your combo box source includes the course description
as one of its fields. Then, one approach would be to add code in the combo
box's AfterUpdate event that "sets" the value of a textbox control (unbound)
that you've added to your form. The code looks something like (actual
syntax may vary):

Me!MyTextBox = Me!MyComboBox.Column(n)

where "n" is the number of the column from the combo box in which "course
description" shows up. NOTE: the Column(n) feature counts starting at
zero, so if "course description" is the third physical column in your query,
you'd use .Column(2).

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top