Microsoft Access Queries - Drop Down Menu

When creating a query for a database in Microsoft Word, in the design view, there is a row for 'Criteria'. When you add something in like '[Please enter the number you wish to search for]', this comes up as a command box, requesting data.

However, instead of having this box coming up requesting data to be typed in, is there any chance I could have a popup, that will come up with a drop down menu, in which you can search for whatever comes down on the list.

This would be extremely useful for my database.

Thanks,
James.

Comments

  • timeytimey Posts: 19,379
    Forum Member
    ✭✭
    You woulde have to create a separate form for this with a dropdown menu (combo box) on it, and have this come up as a popup. The facility in which you can ask for a parameter in the criteria box cannot do this.
  • [Deleted User][Deleted User] Posts: 108
    Forum Member
    You woulde have to create a separate form for this with a dropdown menu (combo box) on it, and have this come up as a popup. The facility in which you can ask for a parameter in the criteria box cannot do this.

    thank you :) i will do this. how do you make this form come up as a popup. what do you type in the criteria box?
  • timeytimey Posts: 19,379
    Forum Member
    ✭✭
    You would have to call the form into view using VBA code and set the form's Popup property to "Yes" (call the popup form, e.g. "Form1", with "
    DoCmd.OpenForm "Form1", , , , , acDialog"
    
    Then have the combo on that form with the selections that you want in its RowSource property. Then, you could have an OK button on the popup which sets the RecordSource property of the main form to a query with "=[Forms]![Form1]![Combo1]" in the criteria box (where "Form1" is the popup form and Combo1 is the combo box). This will set the criteria to the value that is in the combo box.
Sign In or Register to comment.