Results 1 to 3 of 3
  1. #1
    CoZak is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    May 2018
    Posts
    33

    Set graph rowsource to subform instead of table or query

    Hello, I havent found any help online or some complicated VB code that didnt work

    Is there a way of plotting a Graph based on the values of a subform instead of a table or query?

    I have multiple filters from comboboxes that filter the subform, not the query.
    Also filtering the query in criteria with build with the value from the combobox : Forms![*User Interface]![subform_name].Form![combobox_name], doesnt work either



    I tried the master/child technique with master: cbo_field child: [field]
    And it works well but only for 1 combobox, i cannot add other fields or comboboxes with ";"

    So i wanted to know if I could use the values inside the subform to dynamiccaly plot the chart


    (ranman where are you )

    Thanks in advance!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    suborms USE queries.

    use the BUILDER to get the correct path to form/subform objects.
    to use mulitiple controls, you must examine them all and build the where:

    Code:
    '----------------
    sub btnFilter_click()
    '----------------
    dim sWhere as string 
    
    sWhere = "1=1"
    if not IsNUll(cboST) then sWhere = sWhere & " and [State]='" & cboST & "'"
    if not IsNUll(cboCity) then sWhere = sWhere & " and [city]='" & cboCity & "'"
    if not IsNUll(cboZip) then sWhere = sWhere & " and [ZipCode]='" & cboZip & "'"
    
    If sWhere = "1=1" Then
      Me.FilterOn = False
    Else
      Me.Filter = sWhere
      Me.FilterOn = True
    End If
    end sub

  3. #3
    CoZak is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    May 2018
    Posts
    33
    Hi ranman !
    Thanks but the graphs only wants queries and tables, no matter how hard I try I cant get to make it work with a subform...

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

Similar Threads

  1. Replies: 24
    Last Post: 07-28-2015, 10:50 AM
  2. combobox rowsource per row on a subform
    By kowalski in forum Access
    Replies: 2
    Last Post: 12-05-2012, 01:49 AM
  3. Replies: 2
    Last Post: 09-21-2012, 05:42 PM
  4. Replies: 3
    Last Post: 01-10-2011, 10:31 AM
  5. Replies: 0
    Last Post: 08-26-2009, 11:51 AM

Tags for this Thread

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