Creating a report from a form or something similar

rob.lyles

Registered User.
Local time
Today, 03:37
Joined
Sep 2, 2009
Messages
34
Hi, I have about 30+ report formats saved in my database. Generally I open the table in which the data is stored, filter, open the report, and I update in properties to show my filtered data. I'd like to eliminate these steps by using something like a form to choose my filter criteria and have a command button open and display my report per that criteria. Does anyone know if this is possible?? Thanks!

Rob
 
Not only possible but very common. Two most common methods are using a wherecondition:

http://www.baldyweb.com/wherecondition.htm

And using a parameter query (references to the form in the criteria).

Ok, please help me to understand where to use this code. On my form, I have 13 fields. I'd like to use any as many of these as I choose to open a new report. Where does the wherecondition come into play? I also have about 30 reports, how does that tie into the code?
 
When I have a bunch of optional fields, I tend to build a wherecondition similar to the sample database in this FAQ:

http://www.mdbmakers.com/forums/showthread.php?t=4895

The sample is building the entire SQL, whereas for the wherecondition you only need the part after the word "WHERE". If all the reports use the same source, you could also have a combo or listbox that lists the reports, and use that in the OpenReport code.
 

Users who are viewing this thread

Back
Top Bottom