Calculation In Text Box

James Tebb

New Member
Joined
Nov 12, 2009
Messages
26
I have an order form which has a List Box showing Unit Price and a combo box that displays Quantity.
I want a text box to calculate the Line Total eg Unit Price x Quantity. This text box will be bound to a column in the underlying table

Any Ideas
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
This text box will be bound to a column in the underlying table
Why? If you can calculate it, there should be no need to physically store it in an underlying table. Actually, it violates the rules of data normalization to do so.

One way of doing this is to create the formula in a query, and base your form off of the query. The text box can be bound to the calculated field in your query.
 
Upvote 0
Create a new query and add your fields to the query.
Then, create your calculated field. It might look something like this:

LineTotal: [Unit Price] * [Quantity]

(obviously, you may need to change your field names if they are different)

Then, use the LineTotal calculated field in your Form. If you display the Field List, you can just click and drag the field to where you want it on the Form.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,703
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top