How to Get a Value from a Subform in Microsoft Access

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2024
  • In this Microsoft Access tutorial, I'm going to show you how to sum up a field in a subform and display that on the parent form, instead of using the subform footer.
    Andrew from Rochester, New York (a Gold Member) asks: Is there a way that I can sum up a value based on a field in a subform and display that on the parent form, instead of using the subform footer?
    LEARN MORE:
    599cd.com/ValueFromSubform
    PRE-REQUISITES:
    Invoicing: 599cd.com/Invoicing
    Value From a Form: 599cd.com/FormName
    RECOMMENDED COURSES:
    Access Expert 2: 599cd.com/AC10X2
    Access Developer 7: 599cd.com/ACD7
    LINKS:
    DSum: 599cd.com/DSum
    NZ Function: 599cd.com/NZ
    After Update: 599cd.com/AfterUpdate
    SYNTAX
    Fields on a single form: Forms!FormName!FieldName
    Fields on a subform: Forms!ParentFormName!SubFormName.Form!FieldName
    BECOME A MEMBER:
    TH-cam: / @599cd
    or My Site: 599cd.com/THMember
    FREE TEMPLATE DOWNLOADS:
    TechHelp Free Templates: 599cd.com/THFree
    Blank Template: 599cd.com/Blank
    Contact Management: 599cd.com/Contacts
    Order Entry & Invoicing: 599cd.com/Invoicing
    More Access Templates: 599cd.com/AccessTemplates
    ADDITIONAL RESOURCES:
    FREE Access Beginner Level 1: 599cd.com/Free1
    $1 Access Level 2: 599cd.com/1Dollar
    Donate to my Tip Jar: 599cd.com/TipJar
    Get on my Mailing List: 599cd.com/YTML
    Contact Me: 599cd.com/Contact
    TechHelp: 599cd.com/TechHelp
    Consulting Help: 599cd.com/DevNet
    Twitter: / learningaccess
    en.wikipedia.org/wiki/Microso...
    products.office.com/en-us/access
    microsoft.com/en-us/microsoft...
    KEYWORDS:
    access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, #Error, How to get a subform field value, How to Retrieve Values on a Subform, Pass value between a subform and a main form, parent, How to get a value from subform, value from parent form
    QUESTIONS:
    Please feel free to post your questions or comments below. Thanks.

ความคิดเห็น • 21

  • @Richard.E84
    @Richard.E84 4 หลายเดือนก่อน

    Hi Richard, your videos are by far the best I have watched on Access, I've gone from complete clueless beginner to building my first access database purely on your lessons.

  • @rogerstrate5727
    @rogerstrate5727 ปีที่แล้ว

    Thanks so much Richard, I have had this question on my mind for several weeks and you nailed it perfectly for me in this video. I certainly appreciate you and all I continue to learn with Access you are my hero.

    • @599CD
      @599CD  ปีที่แล้ว +1

      Fantastic!

    • @rogerstrate5727
      @rogerstrate5727 ปีที่แล้ว

      @@599CD Thanks again!!!

  • @khia555
    @khia555 ปีที่แล้ว +1

    Are you spying on me? I feel like you’re spying on me! Every time I run into a problem you come out with a video that’s the exact answer to what I need! Loving your content ^^ thank you so much for all you do!

    • @599CD
      @599CD  ปีที่แล้ว +1

      Always watching... always judging...

  • @craigmeyer7494
    @craigmeyer7494 6 หลายเดือนก่อน

    Thank you that helped me. Craig

    • @599CD
      @599CD  6 หลายเดือนก่อน

      Glad it helped

  • @ramiraghat8496
    @ramiraghat8496 ปีที่แล้ว

    Nice video. Thank you.

    • @599CD
      @599CD  ปีที่แล้ว

      Welcome

  • @paulojorgecasanova
    @paulojorgecasanova 10 หลายเดือนก่อน

    I liked this code to fetch values from the sub-form to the parent form:
    Dim valor As String
    'Get the value of the "Nº série" field in the subform
    valor = Me.SubComp.Form.Nº_série.Value
    ' Assign the value to the "SN" field in the parent form
    Me.SN.Value = valor

    • @599CD
      @599CD  9 หลายเดือนก่อน

      If it works, it works.

  • @mosjany
    @mosjany 10 หลายเดือนก่อน

    Thanks for this class its great....but I have one headache > how to I collect invoice payments, able to see invoice balances if paid partial etc please if you can assist

    • @599CD
      @599CD  10 หลายเดือนก่อน

      I cover partial payments in 599cd.com/ACD7

  • @compa1314
    @compa1314 ปีที่แล้ว

    Great Content as always. QUESTION: How can I go about showing outside the subform a DetailSummary where I see All Product Quantity + Name? I tried DetailSummary=[Quantity] & " " & [Name] & " + " in subform footer. And then referenced from parent form with =[frmSubSalesOrders_Details].[Form]![DetailSummary]. The footer field comes out perfectly to from the subform to form. But I cant get the Subform footer to concatenate the Name and Quantity further than the first field from the datasheet subform. Can you think of any way to iterate through the subform datasheet entries whilst concatenating? THANKS!

    • @599CD
      @599CD  ปีที่แล้ว

      599cd.com/Ask

  • @albyluchko6030
    @albyluchko6030 ปีที่แล้ว

    hi Richard - thank you for all the video tutorials! My question is this: I created a continuous form with search boxes as you explained in another video. Works GREAT! I was trying to insert that form (ResearchersListF) as a subform into another form but it doesn't connect the search fields in the query (which references the textboxes in the form e.g. Forms!ResearchersListF!FnameSearch). I get pop ups asking for the values for the search fields whenever it runs the query. the query can't find what it needs. Am I not allowed to use a form also as a subform? I preferred embedding the list of researchers and its search functions into this other form rather than popping open another form/window, but I certainly could if I had to. I hope that makes sense. Basically, can I create a form the relies on a query (as its own form) and also use it as an embedded subform in a different form?

    • @albyluchko6030
      @albyluchko6030 ปีที่แล้ว

      I should clarify - it appears it's just the search that doesn't work. Right now, as an embedded subform, it is passing back the ID of the research I choose if I navigate through the list. But the search doesn't work. When I open the main form, it is asking for the values for all the search box fields. And if I try to search, the pop ups come again. The search works fine with when the form is opened on its own. thanks!

    • @599CD
      @599CD  ปีที่แล้ว

      599cd.com/ask

  • @robertodc62
    @robertodc62 ปีที่แล้ว

    =[Ventas02].Formulario![Texto68] in the parent form or =Formularios![Ventas01]![Ventas02].Formulario![Texto68] in eny other open form

    • @599CD
      @599CD  ปีที่แล้ว

      Uhm... OK. :)