Drop Down boxes (1 Viewer)

MaleNurse325

Registered User.
Local time
Today, 07:18
Joined
Jan 11, 2016
Messages
67
Hi guys,
I have a form with several drop down boxes on it.
These have a score associated with each selection:

Column 1 is the Text and Column 2 is the score.

if you select :
'No damage' the score is 0
'Slight Damage' the score is 1
'Damaged' the score is 2 etc

I would like to add the scores together on the form.

Please try this without VBA is I'm very inexperienced with it.

Thanks. I know you will come through
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:18
Joined
Oct 29, 2018
Messages
21,457
Hi. Are you saying you want to add all the comboboxes for the same record on the form?
 

MaleNurse325

Registered User.
Local time
Today, 07:18
Joined
Jan 11, 2016
Messages
67
No sorry.

Ok I have three drop down boxes (it is an asbestos management database I'm working on so the drop downs are
Surface Treatment with potential scores from 1 to 4
Condition With potential scores from 1 to 3
and Material Type with scores from 1 to 3

The description text is in column one of the drop down the potential scores in column two.
I'd like to be able to add the numerical scores from the drop downs.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:18
Joined
Oct 29, 2018
Messages
21,457
Okay, let me rephrase my question. Are you asking how to add the scores for Surface Treatments for all the records in the table? Also, add the scores for all Conditions in the table and then all the Material Types? So, in the end, you'll have three totals, one for each combobox, but the total is for the entire table?
 

MaleNurse325

Registered User.
Local time
Today, 07:18
Joined
Jan 11, 2016
Messages
67
No, not for the entire table. Just the record.
Each record will have the three drop down lists but I need to add the scores from each of those lists to each other to get a total score.
I have attached a small screenshot of what I am attempting to do.

Sorry if I'm frustrating you. I know you are only trying to help :)
:banghead:
 

Attachments

  • Capture.JPG
    Capture.JPG
    18.9 KB · Views: 26

theDBguy

I’m here to help
Staff member
Local time
Today, 07:18
Joined
Oct 29, 2018
Messages
21,457
No, not for the entire table. Just the record.
Each record will have the three drop down lists but I need to add the scores from each of those lists to each other to get a total score.
I have attached a small screenshot of what I am attempting to do.

Sorry if I'm frustrating you. I know you are only trying to help :)
:banghead:
Okay, so I think that was my first question. I asked if you wanted to add up all the comboboxes' scores together for the same/one record on the form. If so, you should be able to do something like: [combo1]+[combo2]+[combo3]
 

Gasman

Enthusiastic Amateur
Local time
Today, 15:18
Joined
Sep 21, 2011
Messages
14,238
DBGuy,
Column 2 holds the scores.?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:18
Joined
Oct 29, 2018
Messages
21,457
DBGuy,
Column 2 holds the scores.?
Right now, I'm still trying to figure out whether to say combo1+combo2 or sum(combo). Once I knew that, I was going to address either combo1.column... or change bound column to 1 or...
 

MaleNurse325

Registered User.
Local time
Today, 07:18
Joined
Jan 11, 2016
Messages
67
Ok, Lets try this.

Column 1 contains the text and column 2 is the score
No Damage = 0
Slight Damage = 1
Damaged= 2
Baldy Damaged = 4
These values are taken from a table called tblMatter

How can I display the scores in the fields immediately to the right of the drop down boxes after selecting the text from the combo box?
 

Attachments

  • Capture.JPG
    Capture.JPG
    15.6 KB · Views: 32

theDBguy

I’m here to help
Staff member
Local time
Today, 07:18
Joined
Oct 29, 2018
Messages
21,457
Ok, Lets try this.

Column 1 contains the text and column 2 is the score
No Damage = 0
Slight Damage = 1
Damaged= 2
Baldy Damaged = 4
These values are taken from a table called tblMatter

How can I display the scores in the fields immediately to the right of the drop down boxes after selecting the text from the combo box?
Okay, to display the value from the second column in the box next to the combobox, try the following in the ControlSource of the box on the right:
Code:
=[NameOfComboToTheLeft].[Column](1)
Make sure to use the actual name of the combobox to the left.
 

isladogs

MVP / VIP
Local time
Today, 15:18
Joined
Jan 14, 2017
Messages
18,211
Try swooping the two fields in the combo so the score is first.
Set its width to 0 so its hidden and make it the bound column.
You can then just reference the combo omitting any column(1) parts
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:18
Joined
Oct 29, 2018
Messages
21,457
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

MaleNurse325

Registered User.
Local time
Today, 07:18
Joined
Jan 11, 2016
Messages
67
it helps that I am dyslexic... why is that such a hard word to spell??
 

Users who are viewing this thread

Top Bottom