Results 1 to 3 of 3
  1. #1
    tobinjames is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    4

    Run query based on value in combobox

    I have a form with a combobox containing a list of elements. The row source type for the combobox is a query (SELECT Elements.Element FROM Elements ORDER BY Elements.Element). I would like to run a different query depending on the element selected in the combobox.



    Each query will be a parameter query, the parameter values being provided by text boxes on the form.

    I was thinking that I could add a column to the Elements table to hold the name of the query associated with each element.

    I am not sure how to retrieve both columns from the Elements table into the combobox so that the query could be executed by clicking on a button on the form.

    Any advice would be much appreciated.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    This video should get you started.

    http://www.datapigtechnologies.com/f...earchform.html

    Alan

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,743
    What exactly do you want to see?
    What is the purpose of the combobox?

    Please help us help you.

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

Similar Threads

  1. Query based on ComboBox selection
    By pmac in forum Queries
    Replies: 9
    Last Post: 07-27-2011, 07:03 AM
  2. Combobox Based on a Query
    By injanib in forum Forms
    Replies: 4
    Last Post: 02-09-2011, 03:13 PM
  3. Query based on combobox
    By scotty562 in forum Queries
    Replies: 6
    Last Post: 11-11-2010, 08:49 AM
  4. Query based on Value in a Combobox
    By martinwd in forum Queries
    Replies: 3
    Last Post: 06-02-2009, 02:21 PM
  5. query based on two combobox
    By datto in forum Queries
    Replies: 0
    Last Post: 04-18-2007, 11:10 PM

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