Results 1 to 5 of 5
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    populate text box


    All; using 2010. I have a form and a subform. I filter the subform based on a combo box on the main form. this works fine. But I want the description of the record or records in a unbound text box on the main form to represent the title. I originally used the combo box which again worked until the combo box was set to ="" afterupdate. When this happens; the text box on the main form = "" also because it was based the combo box. So I was thinking I should base it on the subform child field. How do I do this please?

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    One easy way to refer to either a mainform or a subform is to create an unbound textbox on the form you want to use the value and use the builder to refer to the form and or control you want.

    HTH

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    Is the main form bound?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    I did this but I must be referencing the single wrong. The main form is bound. I'm using this code in the unbound textbox on the main form: =form!subform!control

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    What is the name of the subform container control? I always name different from the object it holds, like ctrDetails.

    This works for me:

    =ctrDetails!textboxname
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 9
    Last Post: 07-20-2015, 10:55 AM
  2. Auto populate text from date
    By losingmymind in forum Access
    Replies: 4
    Last Post: 05-30-2013, 10:39 AM
  3. Populate subform text box
    By hilian in forum Forms
    Replies: 8
    Last Post: 12-15-2012, 07:50 PM
  4. Replies: 2
    Last Post: 06-11-2012, 09:37 AM
  5. Replies: 8
    Last Post: 05-17-2011, 04:41 PM

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