Consulting

Results 1 to 4 of 4

Thread: Microsoft Query

  1. #1

    Microsoft Query

    While this may not be a VBA question, I figgered one of you gurus might know how to fix this.

    I have a Database Query in one sheet that refers to a named range in another sheet. I changed the parameters of the named range but my query does not reflect the new data when I refresh it. Seems like a link is broken somewhere.

    Can anyone help?

    Thanks

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    I deal with MS Query a lot...

    You changed the named range definition that refers to the location of the query, but that does not necessarily change the query itself. You mention parameters....are there parameters assigned as criteria for this query?

    Unless you edit the action query using MS Query, the query definition as it were, will not change.

    If your query is requesting data from the named range, changing the Refers To: of the named range will not change the actual query, you must actually edit the query itself...
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  3. #3
    XLGibbs,

    You hit the nail on the head. By parameters I did mean changing the Refers To: definition of the range name.

    However, I have tried to edit the query in Microsoft Query and still do not know how to get it to expand the definition of the range. I have tried to delete the table, readd it, and recreate the query and it still has the old range name definition stored somewhere.

    Can you help?

    Thanks

  4. #4
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    There are two different things you are referring to.

    There is a name that Refers To the query itself. By highlighting in the table area where the query is returned you should see the external data indicators, including the edit query option. Once you edit the query, the returned data should be what you specified.

    Now, a named range that refers to the resulting table has to be specified separately...

    You can insert>name>define
    to create a new name that refers to the range of your table.
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




Posting Permissions

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