Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    pittsburgh, pa
    Posts
    2

    Unanswered: Query value from ComboBox

    I am new to Access (97). I have read through the forum and am unable
    to find a solution to my problem.

    I have 4 separate queries designed. I have a form for each query.
    The queries work fine when I run them on their own. However, instead
    of having 4 separate queries on 4 separate forms, I want to combine
    all the queries onto one form.

    This will enable the user to select the query based on the value in
    the combo box. Example: query_date, query_name, query_location,
    query_employee. The user would then type the criteria into the text
    box and click on "search".

    As I said before, this works fine for each query that I run separately.
    I just want to have the ability to use one form for all queries.

    Is this possible? Thanks in advance.

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Why don't use one query with all the datas (date, name, location,
    employee) and then use only one form.
    Saludos
    Norberto

  3. #3
    Join Date
    Nov 2003
    Location
    pittsburgh, pa
    Posts
    2
    That is what I wanted to do. The problem I had was using the Me.Combobox.Rowsource function. It seemed like I tried it every possible way but it still would not work.

    I ended up figuring it out by piecing together some of the posts in this forum.

    Thanks!

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by dcope
    That is what I wanted to do. The problem I had was using the Me.Combobox.Rowsource function. It seemed like I tried it every possible way but it still would not work.

    I ended up figuring it out by piecing together some of the posts in this forum.

    Thanks!
    Do something like this in your combo box:

    RowSource SELECT DISTINCTROW [Your Query].[date], [Your Query].[Name], [Your Query].[Location], [Your Query].[Employee] FROM [Your Query];
    ColumnCount 4
    ColumnWidths 5,926cm;1,166cm;1cm;1cm
    BoundColumn 2
    ListWidth 11,09cm
    Saludos
    Norberto

Posting Permissions

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