Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2015
    Posts
    7

    Answered: referencing controls in nested subforms

    I've be racking my brain trying to figure out how to reference a text box field on some nested subforms, but it's eluded me. I'm trying to make a user friendly page that will the user will input values into to send to a query. I need to call that particular text box location in the query search terms. Problem is that after I put all the forms in one another it no longer works. It works beautifully if its called, and run, on the form it's directly located on, but as soon as I nest these guys it's not having any of it.

    I've tried multiple variations of: Forms!Mainform!Subform1.Form!Subform2.Form!Control Name but no dice... i don't know if i'm referencing it wrong or if something is bound wrong or something... any help would be greatly appreciated!!!

    I've included a series of pictures to show how the forms are currently set up (bare in mind i don't normally create DBs, so be gentle and don't rip me for the overall setup).
    I've shown all the form pieces in design view (so you can see how they're nested) and then the last is the actual form that the user would see.
    Basically from top level down it goes: [frm Navigation Form] > [frm Williston] > [Query Williston].
    I created the [frm Navigation Form] as a navigation form, if that makes any difference. Referencing the last picture of the form: the search form itself has to be selected from top tab that says "Wiliston" and then the search form selected from the side navi tabs "Search Form".

    Thanks in advance, all you smart people.

    Click image for larger version. 

Name:	1.JPG 
Views:	4 
Size:	138.4 KB 
ID:	16497Click image for larger version. 

Name:	2.JPG 
Views:	2 
Size:	40.7 KB 
ID:	16501Click image for larger version. 

Name:	3.JPG 
Views:	3 
Size:	56.7 KB 
ID:	16499Click image for larger version. 

Name:	form view combined.JPG 
Views:	2 
Size:	49.9 KB 
ID:	16500

  2. Best Answer
    Posted by ranman256

    "use the BUILDER.
    it lets you drill down thru the forms and IT gets the syntax correct for you."


  3. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    use the BUILDER.
    it lets you drill down thru the forms and IT gets the syntax correct for you.

  4. #3
    Join Date
    Aug 2015
    Posts
    7
    I couldn't get it to work before with builder, but i think i had to have the form actually loaded to the spot that i wanted the address location from.
    Before i was just trying to use builder W/O having the form open, and simply navigating to it myself thru the file tree, maybe that was what was giving the the issue?

    I think this may work. such a simple solution, now i feel a bit silly

    Thanks!

  5. #4
    Join Date
    Aug 2015
    Posts
    7

    Red face

    Also, for anyone trying to google search to find this answer (like I did), I think you have to have ALL the forms open, and to the correct spot too. That's how I finally got it to work.

    I had to have the main navigation form open AND the subform(s) open to the correct spot. I navigated to where I needed to be on the form too in design view. Once you do that, you will be able to see the entire object location in BUILDER (even to the text box name i needed) on your query. If you don't see it down to the object level, you haven't opened up the forms correctly.

    Hope this helps someone!

  6. #5
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    It works with the form open, or with the form closed.
    just pick it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •