Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Baltimore, MD, Maryland, USA
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CAN I USE VBA TO CONNECT TO MSQUERY AND RUN A VIEW (OFFICE97/SR2)

    I have an application with some Pivot Tables that use data returned by a query of an external database. The query is relatively complex and it runs much more efficiently if I execute some Views first. MSQuery will allow me to create the views but the code for the view "Create View <ViewName> as Select

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: CAN I USE VBA TO CONNECT TO MSQUERY AND RUN A VIEW (OFFICE97/SR2)

    Hi Epic60sman

    I can feel your rush in the words of your post. Have you checked ADO, ActiveX Data Object? Try it and I think you may find that its all doable. If you need simple examples I will try and dig them up for you.

    Hope this helps.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Baltimore, MD, Maryland, USA
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CAN I USE VBA TO CONNECT TO MSQUERY AND RUN A VIEW (OFFICE97/SR2)

    Hi Wassim:
    Thanks for the quick reply. I have not used ActiveX Data Object yet. So, any ADO examples that you have would be appreciated.
    Stephen

  4. #4
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: CAN I USE VBA TO CONNECT TO MSQUERY AND RUN A VIEW (OFFICE97/SR2)

    Stephen

    Check the MSKB and search for ADO. Some articles that might help would be:
    Q246335
    Q247412
    Q278973

    and one with a bunch of examples would be Q253338.

    Hope this helps.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

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