Results 1 to 2 of 2
  1. #1
    jessebh2003 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    1

    Auto-populated and Calculated Fields in Form Help

    Hi everyone! This is my first post, I've also posted this on MrExcel. Attached is a zip file of my database. I greatly appreciate the help!




    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?


    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?
    • me.ActivitySizeTotalPoints = Val(ActivityLengthValue) + ...



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

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Your zip file is empty.

    I don't think you need dlookups, you can probably use the ActivityLengthDescription.Column(1) for the control source of text box ActivityLengthValue if you set the row source of the combo box so it has two fields(description and length) with length being the second one. To add them up you can simply use the names of the text box controls with the plus sign and you put that in the control source of the ActivitySizeTotalPoints text box.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-02-2015, 12:32 PM
  2. Replies: 1
    Last Post: 11-29-2013, 08:35 AM
  3. Replies: 22
    Last Post: 02-11-2013, 03:03 PM
  4. Issues with Auto populated fields
    By denise1005 in forum Queries
    Replies: 3
    Last Post: 03-17-2011, 10:50 AM
  5. Access 2000 Auto Populated Fields
    By Cylena in forum Access
    Replies: 1
    Last Post: 05-18-2009, 07:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums