View Full Version : Combo Box Problem


MSUKevin
05-16-2001, 07:51 AM
After reading some of the posts in this forum this is probably a very basic question but its been driving me crazy for days!!! Please Help!!!

I am doing a basic calculation in a text box:

Line Total =([Unit Price]*[Quantity])

The problem I have is that the calculation is taking the ID number in the Unit Price Combo Box Listing, and using it for the calculation instead of the Price entry field. This is my first post on this forum so I will clarify in case my verbage is confusing:
1 : $12.00
2 : $5.00
3 : $4.00
etc...

If someone could help me I would really appreciate it.

charityg
05-16-2001, 08:07 AM
line total=[unit price].column(1) * [quantity]
I'm assuming that "Unit Price" is the name of your combo box, if not change the expression accordingly. Your original calculation is using the hidden primarykey for the combobox. This expression uses the second column of the combobox (the value) to perform the calculation.

MSUKevin
05-17-2001, 04:51 AM
I have tried this but I keep getting #NAME? when I change the view to form. Also Access keeps putting brackets around the word column like it is searching for this in the calculation. Any thoughts on this problem?

Thanks in advance...

MSUKevin
05-17-2001, 05:39 AM
Someone Please Help before I throw my computer out of the window... http://www.access-programmers.co.uk/ubb/frown.gif