Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculating items in a list box

Status
Not open for further replies.

metrodub

Technical User
Dec 29, 2004
82
US
On a form, I have a list of classes. When a user chooses a class, the associated materials and their price are shown in a list box.

Is there a way to calculate the items in the list box (ie: handbook costs $10, notepad $3...total in textbox = $13)?

Is having the items placed in a list box the best way to do such a thing? I've done the same with a sub-form, but it's just not attractive.

Thanks in advance.
 
Hi!

You can try putting a text box below the list box and set the control source to:

=DSum("Price", "YourTableOrQuery", "YourClassField = '" & Me!YourClassTextBox.Value & "'")

Once the class is chosen you can refresh the text box.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top