#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2006
    Posts
    99
    Rep Power
    13

    Red face Pull Down Query List


    I was wondering was it possible to have my queries in a pull down list and I hit a button and the query/report is ran? Or do I have to stay with about 6 or 7 buttons on a form?


    I know it sounds crazy.....
  2. #2
  3. Database junkie..
    ASP Scholar (3000 - 3499 posts)

    Join Date
    May 2004
    Location
    Derry, N Ireland
    Posts
    3,092
    Rep Power
    58
    not crazy at all

    use this as the row source for your combo

    SELECT MSysObjects.Name
    FROM MSysObjects
    WHERE (((MSysObjects.Type)=5));

    BEWARE: this will list ALL queries in your db.

    Then in the after update event, or a command button

    dim myQ
    myQ = me.[the name of your query combo]
    docmd.openquery myQ

    beware: this code does NOT check that there is in fact something selected in the combo
    Regards,

    Colm



    If you found a post particularly helpful, show your appreciation by clicking the "scales" icon in the bar just above the post, at the right hand side.
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2006
    Posts
    99
    Rep Power
    13
    Originally Posted by meloncolly
    not crazy at all

    use this as the row source for your combo

    SELECT MSysObjects.Name
    FROM MSysObjects
    WHERE (((MSysObjects.Type)=5));

    BEWARE: this will list ALL queries in your db.

    Then in the after update event, or a command button

    dim myQ
    myQ = me.[the name of your query combo]
    docmd.openquery myQ

    beware: this code does NOT check that there is in fact something selected in the combo

    THANKS! Damn I think I would just quit if it wasn't for the information from you experts!

Similar Threads

  1. Date Query: Not In List
    By NICKUSAF in forum ASP Development
    Replies: 1
    Last Post: June 20th, 2006, 08:12 AM
  2. Query results include number list
    By sosmond in forum Microsoft Access Help
    Replies: 2
    Last Post: February 3rd, 2006, 04:56 PM
  3. List Menu Query
    By h-kay in forum ASP Development
    Replies: 1
    Last Post: September 21st, 2005, 06:04 AM
  4. Replies: 0
    Last Post: July 12th, 2004, 10:08 AM

IMN logo majestic logo threadwatch logo seochat tools logo