473,396 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Summing the values using multiple combo box in access

Hi all,

I have a problem with adding the selected values from three different combo box.
I want the sum of these values selected, in a different text box.

Please let me know if you need further details.
Please help me to do this in a simple way...

Thanks in advance,
Prashant
Feb 22 '07 #1
9 5506
Rabbit
12,516 Expert Mod 8TB
Well... what's the problem?
Feb 22 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Hi all,

I have a problem with adding the selected values from three different combo box.
I want the sum of these values selected, in a different text box.

Please let me know if you need further details.
Please help me to do this in a simple way...

Thanks in advance,
Prashant
Make control source of the textbox
Expand|Select|Wrap|Line Numbers
  1. =[Combo1Name]+[Combo2Name]+[Combo3Name]
Mary
Feb 23 '07 #3
Make control source of the textbox
Expand|Select|Wrap|Line Numbers
  1. =[Combo1Name]+[Combo2Name]+[Combo3Name]
Mary

Thank you, It works....

I have a similar kind of problem...
same three Combo box has 2 columns each (Options and Ratings)
Options (Ratings)
Strongly Agree (50)
Agree (40)
Neutral (30) and so on....

Now I want only, the sum of ratings to be displayed on text box
for ex: if I select Strongly agree(50) from Combo1 and Agree(40) from Combo2 and Neutral(30) from combo3 --- Result in text box should be 120

Is it possible to do this, let me know...
Thanks in advance for your handy suggestions.
Feb 23 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
Thank you, It works....

I have a similar kind of problem...
same three Combo box has 2 columns each (Options and Ratings)
Options (Ratings)
Strongly Agree (50)
Agree (40)
Neutral (30) and so on....

Now I want only, the sum of ratings to be displayed on text box
for ex: if I select Strongly agree(50) from Combo1 and Agree(40) from Combo2 and Neutral(30) from combo3 --- Result in text box should be 120

Is it possible to do this, let me know...
Thanks in advance for your handy suggestions.
In the combobox properties change the bound column in each from 1 to 2. This will only work if you are not using the combo boxes for any other reason and not storing the selections in a table anywhere.

Mary
Feb 23 '07 #5
In the combobox properties change the bound column in each from 1 to 2. This will only work if you are not using the combo boxes for any other reason and not storing the selections in a table anywhere.

Mary

I did change the bound coumn to 2, but it concatenates the values and does'nt sum the values.

Thanks
Prash
Feb 26 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
I did change the bound coumn to 2, but it concatenates the values and does'nt sum the values.

Thanks
Prash
Prash are these number values or strings. They have to be numbers if you want to add them.

Mary
Feb 26 '07 #7
Prash are these number values or strings. They have to be numbers if you want to add them.

Mary
Hi,
As I told before the combo box contains two coumns (Options and Ratings)
whereas Options is Text and Ratings is Number datatype.
When I from select Comb1 i.e. Option as Strongly agree - its rating 50 display in text box and from combo2 i.e. Option as Agree - its rating 40 display in text box. The result shows 5040 instead 90 in text box.

But when I take out the options column from table and keep only ratings which as number as datatype then I get the result as 90.

I want both Options and ratings in same combo and with the result.
Is it possible?
Hope this helps u understand my problem, Sorry for such annoying problem.

Thanks,
Prash
Feb 26 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
Hi,
As I told before the combo box contains two coumns (Options and Ratings)
whereas Options is Text and Ratings is Number datatype.
When I from select Comb1 i.e. Option as Strongly agree - its rating 50 display in text box and from combo2 i.e. Option as Agree - its rating 40 display in text box. The result shows 5040 instead 90 in text box.

But when I take out the options column from table and keep only ratings which as number as datatype then I get the result as 90.

I want both Options and ratings in same combo and with the result.
Is it possible?
Hope this helps u understand my problem, Sorry for such annoying problem.

Thanks,
Prash
Prash

Check that the following properties are set for all combo boxes ...

Column Count = 2
Column Widths = 2cm; 2cm
Bound Column = 2

Mary
Feb 26 '07 #9
NeoPa
32,556 Expert Mod 16PB
Hi,
As I told before the combo box contains two coumns (Options and Ratings)
whereas Options is Text and Ratings is Number datatype.
When I from select Comb1 i.e. Option as Strongly agree - its rating 50 display in text box and from combo2 i.e. Option as Agree - its rating 40 display in text box. The result shows 5040 instead 90 in text box.

But when I take out the options column from table and keep only ratings which as number as datatype then I get the result as 90.

I want both Options and ratings in same combo and with the result.
Is it possible?
Hope this helps u understand my problem, Sorry for such annoying problem.

Thanks,
Prash
Prash,
It's hard to know why this is happening in your case. It's not standard behaviour, but I would think getting the required information from you as to what is wrong may be quite complicated.
As an alternative, try setting the Control Source of your TextBox control instead to :
Expand|Select|Wrap|Line Numbers
  1. =Val([Combo1Name])+Val([Combo2Name])+Val([Combo3Name])
Let us know if this is an acceptable work-around. If not we will have to dig deeper, but that will require you to be very precise and specific about what you have set for various items in your database.
Feb 26 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Yaroslav Bulatov | last post by:
I made an array of 10 million floats timed how long it takes to sum the elements, here's what I got (millis): gcc -O2: 21 Python with numarray: 104 Python with Numeric: 302...
0
by: Marco Alting | last post by:
Hi I have three levels of cost items, like the following: TOP_LEVEL SECOND_LEVEL cost_item1 cost_item2 etc... TOP_LEVEL2
2
by: Jen F. | last post by:
I have inherited a medical database in which there are multiple values stored in a single field (ie. "Current Conditions" field might contain 1-20 different conditions, separated by comma (ie....
3
by: ssb | last post by:
Hello, This may be very elementary, but, need help because I am new to access programming. (1) Say, I have a column EMPLOYEE_NAME. How do I fetch (maybe, cursor ?) the values one by one and...
7
by: Hank | last post by:
I have a report-summing problem using Access 2000. When a section runs over the end of the page, sometimes a detail gets picked up twice. Example: Customer Header XYZ Company Detail Section...
4
by: LD | last post by:
Is there a way in Access to store more than one value in a field that has been selected from a combo box? For example, if a combo box had three values that you can select, "One", "Two", and...
1
by: Efecan | last post by:
Hi, I have the following problem, I created a query SELECT Customer_t.S_Street FROM Customer_t WHERE (((!!)=!)); and used this query to populate a combo box. My customers have multiple...
1
by: Prashantsd | last post by:
I would like to sum the values from combo box and get the result in text box. I have three Combo box which has 2 columns each (Options and Ratings) Options (Ratings) Strongly Agree (50) Agree...
4
by: dancole42 | last post by:
So I have an invoicing database based on two main forms: Orders and OrderLines. Orders has fields like: OrderID BillingMethod OrderDate CreditCard CCExp OrdSubTotal ShippingCharge
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.