Auto-populated and Calculated Fields in Form Help

jessebh2003

New Member
Joined
Feb 28, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi everyone! This is my first post. :)

I'm not too savvy with MS Access, but I'm trying. I'm building a form and based on the value of the combobox I want a number to populate in an adjacent text box. Then I want the value of all the text boxes to add up to give me a total. I've watched numerous YouTube videos and read various message boards but all to no avail. Can anyone please help me? Attached is an image of my form.

Auto-populating
My form has three columns (Activity Length, Description, and Point Value). In the Description column, each combobox is a drop down of different values, which are pulled from a table. I want the textbox in the Point Value to auto-populate based on the combo box selection. The point values are also in a table. I've tried =Dlookup but I think I'm doing something wrong.

Example: The first row of my table is Activity Length (ActivityLength_Label), combobox (ActivityLengthDescription), text box (ActivityLengthValue)
Combobox values pull from table (Source Data), column ActivityLength (≤ 3 hours, 4 - 8 hours, 9 - 16 hours, ≥ 17 hours).
Each entry has a corresponding value in column ActivityLengthValues (1, 2, 3, 4).
I want the text box (ActivityLengthValue) to populate from table (Source Data), column ActivityLength based on the selection in combobox (ActivityLengthDescription)

Calculating
Once all of the values populate in the Point Value column, I'd like for the values to add together in text box (ActivitySizeTotalPoints). I've tried:
=sum([ActivityLengthValue] + ...) which results in #Error
=CDbl(Nz([ActivityLengthValue],0))+CDbl(Nz([... which results in #Name?

Example: Here's what I'd like to happen if possible:
(ActivityLengthValue) + (NumberParticipantsValue) + (NumberFacultyValue) + (NumberGrantsValue) + (NumberExhibitorsValue) + (MarketingSupportValue) + (PlanningCommitteeValue) + (TargetAudienceValue) + (ProvidershipValue) + (LocationValue) = (ActivitySizeTotalPoints)

AccessForm.PNG



I really appreciate any help that can be shared. Thanks!
 

jessebh2003

New Member
Joined
Feb 28, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi Micron - sorry, but I don't know how to do that. Access is the one Office product I'm the least familiar with.
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,040
Office Version
  1. 365
Platform
  1. Windows
You must know how to get to the code window if you're writing code, so when you are in that code procedure, click on the blue-gray margin to the left of your code line.
Or there is Google for "ms access breakpoint" or some such similar thing??
 

jackd

Well-known Member
Joined
Oct 19, 2006
Messages
1,308
Office Version
  1. 365
As Micron advised, you have to select a value from each of the combos, AND it is comboD in my mock up that, after selecting a value, populates the textbox.

I tried to highlight that in post #7.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,107
Messages
5,622,782
Members
415,927
Latest member
vedasinternational

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
Top