Access help

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

Guest

I am trying to figure out a little problem I have with my database and am at
my witts end. Here is the deal.

I have products that are assigned a certain material number. In my form I
have a combo box that lists the material numbers and description, what I
would like to be able to do is chose one of the material numbers and have the
description associated with it to pop into another field.

Any suggestions?
 
Form Help said:
I am trying to figure out a little problem I have with my database
and am at my witts end. Here is the deal.

I have products that are assigned a certain material number. In my
form I have a combo box that lists the material numbers and
description, what I would like to be able to do is chose one of the
material numbers and have the description associated with it to pop
into another field.

Assuming the descrption is in the second column of the combo box, you
can add a text box to your form with this controlsource:

=[YourComboBoxName].[Column](1)

(substituting the name of your combo box control for "YourComboBox").

Note that the description will be displayed in the text box, but it
won't be saved in the form's recordsource table. That's normally the
way things should be, since the description is fuilly dependent on the
material number. If you record the material number, you can always look
up the description whenever you need it.
 
I am trying to figure out a little problem I have with my database and am at
my witts end. Here is the deal.

I have products that are assigned a certain material number. In my form I
have a combo box that lists the material numbers and description, what I
would like to be able to do is chose one of the material numbers and have the
description associated with it to pop into another field.

Any suggestions?

Leave the other control's control source blank.
Set the AfterUpdate event of the combo box to:
[OtherControlName]= Me!ComboName.Column(1)

The above assumes the combo box has at least 2 columns, and that the
description is in the 2nd column.
 
YOU'RE A GENIOUS! THANK YOU VERY MUCH!

Dirk Goldgar said:
Form Help said:
I am trying to figure out a little problem I have with my database
and am at my witts end. Here is the deal.

I have products that are assigned a certain material number. In my
form I have a combo box that lists the material numbers and
description, what I would like to be able to do is chose one of the
material numbers and have the description associated with it to pop
into another field.

Assuming the descrption is in the second column of the combo box, you
can add a text box to your form with this controlsource:

=[YourComboBoxName].[Column](1)

(substituting the name of your combo box control for "YourComboBox").

Note that the description will be displayed in the text box, but it
won't be saved in the form's recordsource table. That's normally the
way things should be, since the description is fuilly dependent on the
material number. If you record the material number, you can always look
up the description whenever you need it.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top