Filtering data for a report

brocsman

Registered User.
Local time
Today, 15:36
Joined
Nov 21, 2010
Messages
28
I want to create a report which details records collected by date and place. One report for each date/location combination. These records are stored in a table and accessed using a query, to bring in additional information.

What I need to do is to get this report to limit what it reports to those records found on a particular date, and in a particular location (date and location will form part of the report header).

My idea was to have a button on the Switchboard which opens a small form, allowing the user to select the date and location to form the basis of the report. A further button on this small form would then generate the report.

I thought this was straightforward, and the date part of it works fine, but when I try to match the contents of the location Combo Box on the form to the data in the query the report is based on it fails to find a match, and I get a blank report. The Combo Box is based on a table called Site which also forms part of the report query, so the list of locations must be identical.

I'm sure I'm doing something stupid, but I can't see what it is.

Any ideas?
 
Because it appears to only be you Combo box that is giving you problems, I would check to be sure that the "Bound" value of the combo box is the value that you need for your filtering.

You can have one value bound (like an ID number value) and actually show another value in the combo box.
 
Thanks for the reply. My Combo Box seems to be set up OK. I've attached a macro to the "open form" button, and when I try to step through it I get "true" returned on the match, but it fails to pick up the data records.

I tried to change the Bound column, but I got the key, not the data item I'm trying to match, so I think it's right.

Does it make any difference that the table I use to select the location on the form is also part of the query that underlies the report?


Because it appears to only be you Combo box that is giving you problems, I would check to be sure that the "Bound" value of the combo box is the value that you need for your filtering.

You can have one value bound (like an ID number value) and actually show another value in the combo box.
 

Users who are viewing this thread

Back
Top Bottom