Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:56:55+00:00 2026-06-14T16:56:55+00:00

Access 2007 Form Name is: MineLocationQuery1 1st Subform name is:MineExtractionSubform 2nd Subform name is:

  • 0

Access 2007

Form Name is: MineLocationQuery1
1st Subform name is:MineExtractionSubform
2nd Subform name is: ExtractionLineSubform2

I am trying to use dlookup to get check a value in a table and then multiply it by another value. It works with: NO Subform and with 1 Subform. But when I add 2 subforms I cannot get it to work.

Here is what I have tried so far

Simple form lookup that works:

=DLookUp("[Price]","[Resource]","[AtomicRef]='" & [Forms]![ExtractionLine]![AtomicRef] & "'")*[Tonnage]

Here is the working example from a form created with 1 subform:

=DLookUp("[Price]","[Resource]","[AtomicRef]='" & [Forms]![MineExtraction1]![ExtractionLineSubform]![AtomicRef] & "'")*[Tonnage]

And here is 1 of the many attempts I have made with 2 subforms and it is not working.

=DLookUp("[Price]","[Resource]","[AtomicRef]='" & Forms![MineLocationQuery1]!MineExtractionSubform.Form!ExtractionLineSubform2.Form.AtomicRef & "'")*[Tonnage]

What am I doing wrong other than getting tired and frustrated at copying and pasting many attempts into the worths textbox control source and repeatedly getting #Name errors

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:56:56+00:00Added an answer on June 14, 2026 at 4:56 pm

    If I wish to refer to a nested subform in a textbox on the main form, I might say:

    =[SubformControl1].[Form].[SubformControl2].[Form].[AControlName]
    

    Note that this uses the name of the subform control and Form as a reference to the object contained by the control.

    So this (split for ease of reading) looks right:

    =DLookUp("[Price]","[Resource]","[AtomicRef]='" & Forms![MineLocationQuery1]!
    MineExtractionSubform.Form!ExtractionLineSubform2.
    Form.AtomicRef & "'")*[Tonnage]
    

    However, it is very easy to get names wrong. For example, you may be referring to the form contained, rather than the subform control name. You can use the Expression Builder to troubleshoot, or you can refer to the form bit by bit in the immediate window (Ctrl+G) to ensure you have the names right. For example:

    ?Forms![MineLocationQuery1].Name
    ?Forms![MineLocationQuery1]!MineExtractionSubform.Name
    

    More information: http://access.mvps.org/access/forms/frm0031.htm

    EDIT re comments

    If you work in subform 2, as I believe you should in this case, you can simply refer to [atomicref]:

    =DLookUp("[Price]","[Resource]","[AtomicRef]='" & [atomicref] & "'")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MS Access 2007 subform that is displaying data in continuous form
I have text-box in some form in access 2007. I am trying to replace
I am trying to import data into access 2007 from a MS Word form
So, I built a form in Access 2007, and put a subform on it.
In Microsoft Access 2007 under (Form View), how do you make text in a
I'd like to add a Browse button to an MS Access 2007 form that
I have a form created in Access 2007, but there is a need to
I have a form in Access 2007 . In the form is a browse-file
I have a form in MS Access 2007. To change from one inputfield to
I have an option group on a form (Ms Access 2007) wiht some toggle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.