Automatically displaying values on a Form

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

Guest

Hi,

I using a Combo box on a form from which the user can make a selection from
a Table. Each selection also has a value assigned in an adjacent field. I
would like for the value of the slection to automatically come forward to the
Form when the selection is made. I'm using the Form to enter data into a
predefined Table. The only way I've been able to get the value of the
selection is by using a second Combo Box. It's annoying for the user. This
should be simple - I've even managed to do it before but can't remeber how I
did it. Really need some help on this one.

Thanks - - -
 
Hi,
Not quite sure what you're sfter here but...
You can include the field you want in the the query that feeds the combo.
Then you can populate a text box by referencing that column in your combo:

Me.yourTextBox = Me.yourCombo.Column(2)

adjust the column number as neccessary
 
Hi Dan,

Let me try to clairfy what I'm after. Let's suppose that I'm selling
Sandwiches (which I'm not) and I want to track sells of different kinds of
sandwiches. I have a table set up with just Egg Sandwiches of which there
are four or five different selections that could be made. Each of the five
selections has a different price. So, in this table for Egg Sandwiches there
are the description and the price for each.

Now - I've got another Table set up just to collect odering information. I
have created a From through which the User can select the Sandwiches and
store the selection in the Ordering Information Table. This Form uses a
Combo Box that allows the user to select the Sandwich. What I want is for
the price of the Sandwich to automatically display on the Form when the
Sandwich is selected.

Selecting the Sandwich for the Egg Sandwich Table with a Combo Box works
great, but I just haven't been able to automatically display the price along
with it. I alread tried to create a Query and populate a Text Box of the
Form as you've suggested instead of linking the Form directly to the
"Ordering Information Table"; then the problem becomes one of Access telling
me that "This Record is not updateable". Which means I can't write back to
the "Ordering Information Table" via my Form through the Query.

Man - I hope this dosen't confuse.

Thanks,
Larry
 
Back
Top