Need report to open form then open query

saseymour

New member
Local time
Today, 17:52
Joined
Jun 12, 2013
Messages
8
OK, this is what I want to do:

I have a table of data. One of the fields is a combobox that populates itself from another table. I want to be able to create a report that prompts the user to select the data from combobox list, then display the query results.

I've read on the interwebs that in order to do this, I have to create a form that consists solely of the combobox, then get the query to run when the combobox is updated.

OK, so when I open the report, the form pops up. I make my selection from the combobox and have to hit enter (is there a way to have it activate upon just clicking on the selection in the combobox instead of having to hit enter?), then the results of the query show up, and the report is closed. The only problem with this at the moment is that the combobox selection is made, the data table shows up with all of the results, then when that is closed, the report opens and displays all of the results (even those that weren't selected in the combobox.)

Any idea why the report would close and the query results would be displayed in table view without being filtered by the combobox entry?
 
...
OK, so when I open the report, the form pops up. I make my selection from the combobox and have to hit enter (is there a way to have it activate upon just clicking on the selection in the combobox instead of having to hit enter?) ...
Normally it is the other way round - first open the form, make the selection and then open the report.
 
Well, I kind of do that. I have a navigation form, which has several tabbed forms. On one form is a bunch of button controls. You hit the button, it launches the report, that is based on a form (combobox) that passes that criteria to the query.

My problem is that I have the form that passes information to the combobox working.

So far, I have two queries, one pulls data for 30 days, the other for 7 days. Each query has a separate form that calls it.

The report for the 30 days works fine. The report for the 7 days does not work. I copied the report / form / query from the 30 days and renamed it for the 7 days and updated all of the macro's, procedures. But the 7 days does not seem to be using the combobox criteria.

Completely mind boggling.
 
OK, I'm a dumb*ss. All of my queries are similar, and I was calling the wrong one in the report.

Now works fine. :o
 
I'm working on similar item.

How did you get your combobox to pass on to the query?

I've tried filtering the result field in the macro on the command button and the report.

Won't pick up the combobox entry I selected to run the report?
 

Users who are viewing this thread

Back
Top Bottom