Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    52

    Unanswered: query in one form and chart on other, plz emergency

    i have this query in one from but i need to show graph depending on this query on other form, how to do it, plz reply me ASAP.
    thanx and this is the code
    Dim db As DAO.Database
    Dim rs As DAO.Recordset

    csBarrage = cmbBarrage.Value
    cD_From = CalendarFrom.Value
    cD_To = CalendarTo.Value

    Graph1.RowSource = "SELECT * FROM " & csBarrage & " WHERE Date BETWEEN # " & cD_From & " # AND # " & cD_To & " #;"

  2. #2
    Join Date
    Nov 2002
    Location
    Sweden
    Posts
    3
    Try the following:

    ------------------------
    Dim strSQL as String

    strSQL= "SELECT * FROM " & csBarrage & " WHERE Date BETWEEN # " & cD_From & " # AND # " & cD_To & " #;"


    Graph1.RowSource = strSQL
    Forms("<FormName>").<GraphName>.RowSource = strSQL
    ------------------------

    Exchange <FormName> with the name of the other form.
    Exchange <GraphName> with the name of the graph on the other form.

    NOTE: I think that the other form must be loaded in order to make it possible to access it via the VBA code.

    Good Luck!

    /David Kaplan

  3. #3
    Join Date
    Jan 2003
    Posts
    52

    Thumbs up

    thanx a lot man

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •