Results 1 to 2 of 2
  1. #1
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568

    Creating pivot table via Access Runtime

    Hi,



    i can create a form for Access Runtime with pivot table but i want to add possibility for users to choose what fields should be shown in pivot.
    Users can arrange already pulled out fields (by administrator with full Access instance) but they can not add new ones...

    Users are using Access runtime.
    It is a posibility to do it ?

    Or maybe use something else?

    Best Wishes,
    Jacek Antek

  2. #2
    jaryszek is offline Expert
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    568
    Hi,

    it is possible using code and Web Components reference library:

    Code:
    Private Sub Polecenie11_Click()
    
    Dim fst1 As Object
    Dim frm1, frm2 As Object
    Dim cBox As CheckBox
    Dim Coll As New Collection
    Dim rst As Recordset
    
    
    
    
    'Open form in PivotTable view and set
    'a reference to the form
    DoCmd.OpenForm "BrakiForm_Pivot", acFormPivotTable
    Set frm1 = Forms.Item("BrakiForm_Pivot")
    ''Set frm2 = Me.Form
    ''
    ''Set rst = frm2.Recordset
    ''
    ''    For Each cBox In frm2
    ''        If cBox.Value = -1 Then
    ''            Coll.Add
    ''        End If
    ''    Next cBox
    ''Me.PivotTable.ActiveView.DataAxis.FieldSets(0).Fields(0).DetailBackColor = RGB(155, 155, 155)
    
    
    'Set PivotTable fieldsets
    With frm1.PivotTable.ActiveView
    ''    Set fst1 = .FieldSets("ID")
    ''    .RowAxis.InsertFieldSet fst1
        Set fst1 = .FieldSets("Data_Przypomnienia")
        .DataAxis.InsertFieldSet fst1
        Set fst1 = .FieldSets("Imię_i_Nazwisko")
       .DataAxis.InsertFieldSet fst1
        Set fst1 = .FieldSets("Dokument")
       .DataAxis.InsertFieldSet fst1
       
    End With
    
    
    End Sub
    Jacek

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

Similar Threads

  1. Creating a pivot table in Excel
    By crowegreg in forum Programming
    Replies: 7
    Last Post: 01-20-2014, 08:32 PM
  2. Creating a pivot table
    By crowegreg in forum Reports
    Replies: 1
    Last Post: 01-08-2014, 07:29 PM
  3. Access 2010 VBA Creating Pivot Table in Excel
    By Tomlon in forum Programming
    Replies: 1
    Last Post: 02-07-2013, 02:25 PM
  4. Creating a pivot table like query
    By razkowski in forum Queries
    Replies: 2
    Last Post: 07-03-2012, 09:45 AM
  5. Creating Excel pivot table issue
    By Reaper in forum Import/Export Data
    Replies: 1
    Last Post: 06-14-2012, 12:32 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