• list in parameter query (97)

    Author
    Topic
    #358716

    Is it possible to create a parameter query that would have a list for the user to choose from?

    eg. If I had a list of cities that customers lived in, and wanted the data just on those who lived in London, could the user select from a list and choose London. At them moment I have separate queries for each choice as it avoids spelling mistakes on the part of the user, but being able to choose from a list would eliminate the need for several different queries.

    Also would it be possible if I were to use such a query to generate a report, that the entered data (London) could be incorporated into the title of the report?

    Thanks for any suggestions.

    Viewing 0 reply threads
    Author
    Replies
    • #535846

      You’ll have to use a form with a listbox or combobox and reference that form and control in the criteria line of your query.

      • #535862

        Thanks Charlotte, but can I ask another question? How do I reference the form in the criteria.

        I created a table called tblType and a Field called Cities so in my form called frmTypeSelect I made a combo box called cboTypeCities.

        In my criteria on the query I tried
        =[Forms]![frmTypeSelect]![cboTypeCities]
        but when I run the query I still have to type London in.

    Viewing 0 reply threads
    Reply To: list in parameter query (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: