Select item from drop down list to run a report

gbuckton

Registered User.
Local time
Today, 09:46
Joined
Aug 20, 2008
Messages
38
Hello,

I would like to customize my reporting so the user can complete these steps:

1) select a species from a drop-down list
2) generate a report for that species

Following the example from this post, I have created the following:

1) a form (ReportSelect_Species) with a drop-down Species list (gets values from MonitorFauna table) note:drop-down called 'SpeciesIDList'
2) a query that includes desired info
3) in the criteria of the query I placed the following code under the SpeciesID Column:
Code:
Forms!MonitorFauna!cboSpeciesIDList
4) a blank report with the recordsource set to the query
5) the form's recordsource is set to the report

When I open the form, the drop-down list is not working properly, I see the values but it will not allow me to select a species nor does it run the report.

Any suggestions as to what might be wrong would be greatly appreciated!

G
 
I don't think you want number 5 in there. Try dropping the form's recordsource and see if that helps.
 
I deleted the form's recordsource but the same issue is occurring. I noticed when I left-click on a Species value in the drop-down list, I get this error message in the bottom of the MS Access window:

Control can't be edited; it's bound to unknown field 'SpeciesID'.

Does that help clarify?
 
Generally if the form is just for report criteria, it does not need a recordsource and the combo does not need a control source (just a row source). Try that.
 
Ha! OK yes indeed deleting the Control Source of the combo box fixed the issue and now the Species can be selected... BUT, my understanding (well, assumption!) from the example I followed was that once the item (species) was selected in the drop down, the related Report would automatically pop up.

Any suggestions as to how to achieve this?

I should also mention my Row Source is set to 'Table/Query'....

thanks
 
I didn't get that impression, but the way to do it would be to put code to open the report in the after update event of the combo (open the form, then the report). Another technique, that perhaps the other thread was using, is to have code in the report's open event to open the form in dialog mode, and when the form is closed or hidden the report finishes opening (open the report, which opens the form).
 

Users who are viewing this thread

Back
Top Bottom