Solved

How do I use a combo box to enter a parameter value?

Posted on 2016-11-10
4
72 Views
Last Modified: 2016-11-10
Hi, all you Access experts out there.

I have a database titled AdjMailRequests.  The database has as its primary data component a table titled tblAdjMailRequests.  The table now has several thousand records.  One of the fields in the table is Area, which has 8 possible values, and which could potentially include more than 8 values.  I would like to be able to search the table based on the value in the Area field, and retrieve all the records from the table where the value in the Area field equals a specified value.

I have a query titled qryRequestBusinessArea.  The query returns all the fields from the table, and has [Business Area] as the criterion in the Area field of the query Design View.

There is a form titled frmBusinessAreaSearch, which has as its record source qryRequestBusinessArea.

There is a button labeled "Business Area Search Form."  The button's On Click event calls the form frmBusinessAreaSearch.  When the button is clicked, an Enter Parameter Value dialog box is displayed with the caption "Business Area."  One of the 8 possible values from the Area field is manually entered in the input area of the dialog box as the parameter.  When the dialog box's OK button is clicked, frmBusinessAreaSearch opens, and displays a split form with all of the retrieved records shown in the bottom datasheet portion of the split form.

There is a table containing all the possible values in the Area field.  This table is titled tblBusinessAreas, and its records are retrieved with the query qryBusinessAreas.

Is there a way to make the button display a combo box with a drop-down menu of all the 8 possible values from the Area field, select one of those values from the combo box, and then pass the selected value to the called form as the parameter?

The database is attached.

Thank you very much.

Errol Isenberg
Government Operations Specialist
AdjMailRequests.accdb
0
Comment
Question by:Errol_Isenberg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
John Tsioumpris earned 500 total points
ID: 41882213
A bit quick and dirty....
AdjMailRequests.accdb
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 41882224
See my Fancy Filters sample database, which does just what you want, with examples of selecting filter values of various data types.  Here is a screen shot of the form:

Fancy Filters formaccarch129.zip
0
 

Author Closing Comment

by:Errol_Isenberg
ID: 41882292
John, this is great.  Thank you so much.  This is my first Access database and your solution will definitely make it more useful to my management and more user-friendly.
0
 
LVL 17

Expert Comment

by:John Tsioumpris
ID: 41882548
Thanks Errol...welcome to the wonderful world of Access....and if you encounter any problem EE is here
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question