I'm trying to display total in a textbox using the values from a table.
I have two tables, one with "Room Type" & Different meal rates for that particular room type.
I have created a from in which I can select a room type (using a combo box) and select the meal types I want (using check boxes). I also have a textbox to enter no. of people. Now I want to display the total in another textbox when certain room type and meal type is selected.
For example,
Room1 's Meal_Type1 = $50 & Meal_Type2 = $30
If I select Room1 with Meal_Type2 and no.of people as 2, then the total would be 50 x 2. How can I display this total in the Total textbox?
I also have attached a sample database.
Display Total in a Textbox
-
- NewLounger
- Posts: 20
- Joined: 25 Mar 2014, 08:49
Display Total in a Textbox
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Display Total in a Textbox
I would calculate the total in a query, and make that query the record source of the form. You shouldn't store the total in a table, since it can be calculated whenever it's needed.
See the attached version:
See the attached version:
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 20
- Joined: 25 Mar 2014, 08:49
Re: Display Total in a Textbox
Thanks Han. The solution was perfect as always. :D