Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropdown Box as Criteria for Report

Status
Not open for further replies.

blackte

Programmer
Jul 24, 2001
80
0
0
US
I have a couple of reports that I have asked the user to input a name value. I would like to be able to offer a dropdown box with the names available for clicking, so that the user does not have to type correctly. Can anyone give me some direction as to how or if any possible. Thanks in advance for the help with this. Thanks Travis.
 
What I like to do is to create a table that has the names in it (set it up the way you like it). Use a combo box to get your information, form the table that you created, set limit to list. Include the same name table you created in your report query. Then your field will be available to print from and filter by.

What I also do is if the name is not on the list, I set up code on the double click of the combo box that opens the file to add a name, you must do a me.refresh after the name has been added before the new name will show up in the combo box. If it still does not show up you may also have to do a requery.

Good Luck

Butch
 
Create a grouping query from your source table that groups on the name field. To do this, bring up the query builder, select the table, drag the name column to the grid, then right click on the sort cell and select Totals. This makes it a grouping query (and adds a new row called Total: in the query build grid). You can set the sort to ascending.

For the combo box select the query you just created as the source. You're ready to go. Once a name is selected, have the user click on a button to run the report.

By the way, check out the PrintOrPreview function I posted a while ago for a handy way to give the user the option to print or preview any report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top