?
Solved

Subform Pivot Fun

Posted on 2011-10-15
8
Medium Priority
?
331 Views
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.
0
Comment
Question by:Canders_12
  • 3
  • 3
7 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 1000 total points
ID: 36974661
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
 

Author Comment

by:Canders_12
ID: 36976072
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
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 1000 total points
ID: 36980719
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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:Canders_12
ID: 37047492
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
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37047514
No worries here...

Family comes first
0
 

Author Comment

by:Canders_12
ID: 37095650
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
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37305176
mbizup,

I only howl during a full moon.

Delete is fine with me.

;-)Jeff
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

807 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