Argonaught
06-27-2003, 05:12 AM
Hi,
ive built a basic database to list books.
I would like to compile a report from a query to list all books by individual authors.
What i mean is i would like to have a report with all books by one author listed on a report, and be able to change the report to show different authors depending on who i select.
Is this done in a query and if so can anyone point me in the right direction as i have created querys already but only based on on/off or yes/no etc.
Cheers
Argonaught:confused:
Typically you would have a form that you could select an author from, and use that as the criteria in a query to pull that author and any associated books by that author. This query would be used by your report to "put it on paper".
Argonaught
06-27-2003, 06:39 AM
So do i have to have my [authors] field as a list box, if so can it be added to?
It doesn't have to be, depends if you want a seperate search function to kick off your report, or a button on an exiting form. The query criteria just needs to reference something on the form (a key is the best choice, but not neccessary) to use to make it's basic selection. Design a query to pull the author information, and in the criteria put a value to pull a single author (use QBE grid to do this). Run the select query to verify it pulls the correct data. Now where you have that author criteria, replace that with a reference to your form control that contains the author criteria. MAKE SURE YOUR FORM IS OPEN AND AN AUTHOR SELECTED. Run the query again and verify it pulls the author from the criteria on the form. A form reference is typically Forms![MyFormName]![MyControlName]
Argonaught
06-29-2003, 01:30 PM
That works but the popup box gives the form path, and i cant change it, i looked at parameters but it is not listed there, do you know where i can change the popup box text.
Cheers Argonaught
First: Did you create a query to pull the information you want, with a hard coded criteria of one author in it?
Do that first, and post the SQL here.
Argonaught
06-30-2003, 11:32 AM
Its o.k i sorted the problem, but thanks for the help.
Cheers Argonaught