Subform Pivot Fun

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.
Canders_12Asked:
Who is Participating?
 
mbizupConnect With a Mentor Commented:
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.
0
 
Canders_12Author Commented:
mbizup:

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.
0
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
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", ...so 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)



0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Canders_12Author Commented:
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.
0
 
Jeffrey CoachmanMIS LiasonCommented:
No worries here...

Family comes first
0
 
Canders_12Author Commented:
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.
0
 
Jeffrey CoachmanMIS LiasonCommented:
mbizup,

I only howl during a full moon.

Delete is fine with me.

;-)Jeff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.