Results 1 to 7 of 7
  1. #1
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168

    Dynamic Subform Title

    I have a form that shows the data for each "Chapter" and a subform in that report that shows the "Houses" in that chapter



    I would like the caption for the subform report to show

    Chapter "__" Houses

    with the "__" being what ever chapter the form is currently showing, so if i'm looking at chapter 7 the caption would show
    Chapter 7 Houses

    somehow linking the subform caption to the Form chapter name property


    again I apologize, very new to access so I am still struggling to a bit to even understand how to properly ask questions
    Thank you for everyone's help

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,656
    again I apologize, very new to access so I am still struggling to a bit to even understand how to properly ask questions
    Apology accepted, but not really neccessary

    A form,subform,report, and subreport are very different things so its a little confusing when you state things like " the subform report"
    Being new its OK. Just something to bear in mind.

    If I follow you correctly you want to set the caption of the label attached to the subform or subreport control.
    To do that you would use something like

    Me.Whateverthelabelnameis.Caption = "
    Chapter " & me.yourChapterNumber & " Houses"



  3. #3
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168
    ok question

    where do I put that wonderful piece of information? I understand the "whateverthetablenameis" and "yourchapternumber" and have changed those appropriately (it think)

    Me.tbl_Houses.Caption = "Chapter" & me.ChapterName & "Houses"

    I tried entering that in the caption property of the label but it just shows that full text.

    (now Im sure your probably laughing and going to tell me I need to put that into a VBA module somewhere in which case I am going to need more help or just wait until I'm a little further along with my access experience)

    Thanks again

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,656
    I would probably use the OnCurrent event.

    heres an example.Hope its what your looking for.
    Attached Files Attached Files

  5. #5
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,656
    btw, you were close. You need to include the spaces between the quotation marks.

    Me.tbl_Houses.Caption = "Chapter" & me.ChapterName & "Houses" would be Chapter7Houses
    should be
    Me.tbl_Houses.Caption = "Chapter " & me.ChapterName & " Houses" would be Chapter 7 Houses

  6. #6
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168
    WOW!!!

    That was a considerable amount of work to show me how to do that.
    sincerely appreciated!

  7. #7
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,656
    Glad you got it sorted.
    Good luck with your project.

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

Similar Threads

  1. Dynamic Chart Title in Report
    By MatthewR in forum Reports
    Replies: 4
    Last Post: 01-12-2016, 11:49 AM
  2. Replies: 2
    Last Post: 03-20-2015, 06:30 AM
  3. Replies: 12
    Last Post: 12-06-2014, 06:29 PM
  4. Replies: 8
    Last Post: 05-19-2014, 05:05 AM
  5. Dynamic Chart Title in Report
    By Kirsti in forum Reports
    Replies: 10
    Last Post: 03-21-2012, 01:56 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