View Full Version : Problems with combo boxes...


MSUKevin
05-17-2001, 04:42 AM
This issue has been driving me bananas so if someone could help I would really appreciate it!!!

I have created a database to track sales. I have a table called "transactions" and a table called "Transaction Details". The setup is very similar to the orders entry sample database. What I am having problems with is that I want to have a combo box list the product name and price per unit. I am able to build the combo box in my transaction details subform through the product ID field that is based off of my products table that, when opened, shows two columns - one with the product name and the other - the price. What I can't figure out how to do is to get the selected price in the combo box into the unit price text box next to the combo box.

I have the the same setup as the order entry database but I can't see how they were able to perform this operation!?!?!

If anyone could help with this problem I would really appreciate it!!!

Thanks in advance...

charityg
05-17-2001, 05:11 AM
combobox afterupdate
me!unitprice=combobox.column(2)
If you have the ID, Product, and price in that order in the underlying query for the combobox, then column(2) should contain the price information.

MSUKevin
05-17-2001, 05:23 AM
Since I'm new to this I want to make sure I understand this so could you tell me where:

combobox afterupdate
me!unitprice=combobox.column(2)

This is put in? Is it in VBA?

I am extremely green with this so a little clarification would really be appreciated!!

Thanx in advance...

Matthew Snook
05-17-2001, 07:16 AM
"AfterUpdate" is an event of your combobox (or any other control). http://www.access-programmers.co.uk/ubb/smile.gif

Matt

MSUKevin
05-17-2001, 07:22 AM
Thanks Matt!

Mucho Aprecio' http://www.access-programmers.co.uk/ubb/smile.gif

Pat Hartman
05-17-2001, 07:23 AM
Please don't post the same question multiple times. It just wastes our time.

MSUKevin
05-17-2001, 07:38 AM
Sorry about the wasted time... but thanks for the help.