Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005

    Add combo box to parameter query

    I am trying to narrow down records of students by subject code and time code. I have a parameter query that prompts users to enter the values. Is there anyway that I can have a combo box instead of having users enter the data themselves? Any help would be greatly appreciated.

  2. #2
    Join Date
    Dec 2005
    Wilmington, DE - USA
    You can do this, but not directly in the query definition itself. You will have to design a form that will have the ComboBox. You could then use code behind the form to implement your selection criterion in a few different ways. For example, if you are ultimately displaying the info in a report, you can use the VBA code to dynamically set the report's data source SQL statement (the ComboBox selection would be used to define the WHERE clause).

    I sometimes go one better by using a multiselect ListBox, and then use code to dynamically build the IN () statement I use in the WHERE clause.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-08-2013, 03:37 AM
  2. Enter Parameter Value
    By plesser in forum Access
    Replies: 1
    Last Post: 11-08-2008, 10:27 AM
  3. How to create a query for logical combo??
    By valkyry in forum Queries
    Replies: 1
    Last Post: 10-08-2007, 02:32 PM
  4. Pull Parameter Value from Form
    By dymondjack in forum Queries
    Replies: 1
    Last Post: 02-14-2007, 07:15 PM
  5. Date Parameter
    By shakira in forum Queries
    Replies: 2
    Last Post: 03-09-2006, 12:55 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