Results 1 to 4 of 4
  1. #1
    anozir is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2013
    Posts
    2

    Event Handlers for Pivot Tables [Access 2007]

    Hi,



    I'm trying to create an event handler for on double click on a pivot table, but the event isn't captured or the handler isn't triggering. Does anyone know how to implement something like this in a pivot table (used as a subform). I've tried tying a field to what is currently selected by =[PivotTable].Form![UniqueID] but that doesn't change from the value of the first record in the recordset.

    Any help will be much appreciated.


    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I've never used pivot table/charts so will be shooting in the dark here. Be aware Microsoft has removed pivot chart/table feature from Access 2013.

    I am surprised the textbox does not show error because the subform/subreport container SourceObject is not a form, it is a table. When viewing the form/subform in Design view, what shows in the subform container control? Does it say Table.tablename?

    I always give subform/subreport container controls name different from the object they hold, like subPivot. Then try:

    =subPivot!UniqueID

    or

    =subPivot.Table!UniqueID
    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.

  3. #3
    anozir is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2013
    Posts
    2
    Quote Originally Posted by June7 View Post
    I've never used pivot table/charts so will be shooting in the dark here. Be aware Microsoft has remove pivot chart/table feature from Access 2013.

    I am surprised the textbox does not show error because the subform/subreport container SourceObject is not a form, it is a table. When viewing the form/subform in Design view, what shows in the subform container control? Does it say Table.tablename?

    I always give subform/subreport container controls name different from the object they hold, like subPivot. Then try:

    =subPivot!UniqueID

    or

    =subPivot.Table!UniqueID

    Hi June,

    Thanks for the assistance! I just found the answer and it turns out that the pivotTable view of a form doesn't reference the table object of the form. Instead it operates under the [Form].pivotTable object (in hindsight, this was a no brainer) and in order for event handler's to react to events on the form, you code in the event listener for the form and not for a particular field. The pivotTable object has the related information stored in pivotTable.selection for cell value, row and column headers which allows me to do what I need to.

    Thanks again!

    EDIT: Thanks for the heads up for 2013. I'll do a bit of research to see if that will cause any headaches later.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Guess I misunderstand the form arrangement. I thought you were pivoting table, not form.

    Glad you found solution.
    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. Access (Multiple tables) & Infopath 2007
    By Raygar in forum Access
    Replies: 0
    Last Post: 02-24-2013, 06:07 PM
  2. Replies: 1
    Last Post: 05-04-2012, 02:22 PM
  3. Creating Tables in Access 2007
    By leighkhonig in forum Access
    Replies: 1
    Last Post: 09-23-2011, 06:34 PM
  4. Replies: 1
    Last Post: 08-22-2011, 02:09 PM
  5. Pivot tables and charts - Access or Excel
    By kkrishna in forum Access
    Replies: 1
    Last Post: 06-06-2010, 04:52 AM

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