Subform Pivot Fun

Posted on 2011-10-15
Last Modified: 2012-05-12
Hello all,

I have  basic understanding of how to refer to fields on a form/subform via VBA but I have come stuck with a subform which is a pivot.  I use the following code:

    MsgBox Forms![frmStaffToTask].[frmMemberAreaDetails].Form![forename]

Now,  All the form names are correct and the forename field is also correct.  When I run the above the good news is that it does not error, however, it always returns the forename of the first person in the list.  Irrespective of what person is highlighted on the pivot subform.

This is driving me mad so any help would be greatly appreciated :)

Many thanks in advance, Alan.
Question by:Canders_12
    LVL 61

    Accepted Solution

    How are you highlighting the subform record?

    If you can post a sample database with any sensitive data obscurred or removed, it would help clarify your setup.

    Author Comment


    I appreciate your response.  I am back in the office first thing in the morning and will pop up a sample database :)

    Many thanks, Alan.
    LVL 74

    Assisted Solution

    by:Jeffrey Coachman
    Remember that a Pivot form is basically a Form with it's default *View* set as "Pivot Table"

    As such, it is basically a "Summary View", you loose a lot of the functionality associated with a form with "Records"
    (Current Event, Detail Section, ...etc)

    So like mbizup, I would like to see exactly what you are dealing with here.

    <it always returns the forename of the first person in the list.  Irrespective of what person is highlighted on the pivot subform.>
        It is always a good idea to First explain what exactly it is you are trying to accomplish (The ultimate goal of this system)


    Author Comment

    A million apologies.  A personal family issue has meant I have not been able to work on this project.

    I  will be back into full swing no later than monday morning.

    Once again, many apologies, Alan.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    No worries here...

    Family comes first

    Author Comment

    Sorry all,

    Things didn't quite pan out, but everyone is now fully on the mend, so someone took over this project.

    Don't mind offering you both 50 / 50 for trying to help out.

    Many thanks, Alan.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    I only howl during a full moon.

    Delete is fine with me.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now