RobertJohn
Registered User.
- Local time
- Today, 09:48
- Joined
- Mar 24, 2008
- Messages
- 14
Hi all.
I am a beginner using Access 2007 to try to develop a small home library application to store details of my book collection.
I originally had trouble with my data entry forms but those problems have now been resolved thanks to help from this forum.
My difficulty now is that my report won't print the records in the order I want.
My database has three tables as follows:
Table 1 Books has fields Book_ID (AutoNumber, Primary Key) and Title.
Table 2 Authors has fields Author_ID (AutoNumber, Primary Key), First_Name and Last_Name.
(These will be extended to include details like Publisher, fiction or non-fiction etc when I get my basic structure right.)
Table 3 Books_Authors with fields Book_ID and Author_ID (both Number fields and both Primary Keys).
This third table (a junction table) is there to enable a many-to-many relationship between Books and Authors, as one author can have several books and one book may have several authors. I have created a one-to-many relationship between Books and Books_Authors on the Book_ID field, and a similar one-to-many relationship between Authors and Books_Authors on the Author_ID field.
I also have a query (qryAuthors) based on the fields of the Authors table and with a "calculated" field, Full Name (Full Name: [First_Name] & " " & [Last_Name]) which is sorted on the field Last_Name. (When I open the query I get the authors listed by their full name but in order of their last names.)
I am trying to create a report which will list all of my authors (using their full name but in order of their last name) together with their books. I used the Forms Wizard to create a form based on qryAuthors and also the Books table to get the book titles, but the records are listed in order of the Author_ID field, not the Last_Name field. The Wizard gives me the option to order the books under each author, but not the authors themselves.
Can anyone suggest what I am doing wrong, so that I can get my records into the correct order?
Thanks in advance
Robert
I am a beginner using Access 2007 to try to develop a small home library application to store details of my book collection.
I originally had trouble with my data entry forms but those problems have now been resolved thanks to help from this forum.
My difficulty now is that my report won't print the records in the order I want.
My database has three tables as follows:
Table 1 Books has fields Book_ID (AutoNumber, Primary Key) and Title.
Table 2 Authors has fields Author_ID (AutoNumber, Primary Key), First_Name and Last_Name.
(These will be extended to include details like Publisher, fiction or non-fiction etc when I get my basic structure right.)
Table 3 Books_Authors with fields Book_ID and Author_ID (both Number fields and both Primary Keys).
This third table (a junction table) is there to enable a many-to-many relationship between Books and Authors, as one author can have several books and one book may have several authors. I have created a one-to-many relationship between Books and Books_Authors on the Book_ID field, and a similar one-to-many relationship between Authors and Books_Authors on the Author_ID field.
I also have a query (qryAuthors) based on the fields of the Authors table and with a "calculated" field, Full Name (Full Name: [First_Name] & " " & [Last_Name]) which is sorted on the field Last_Name. (When I open the query I get the authors listed by their full name but in order of their last names.)
I am trying to create a report which will list all of my authors (using their full name but in order of their last name) together with their books. I used the Forms Wizard to create a form based on qryAuthors and also the Books table to get the book titles, but the records are listed in order of the Author_ID field, not the Last_Name field. The Wizard gives me the option to order the books under each author, but not the authors themselves.
Can anyone suggest what I am doing wrong, so that I can get my records into the correct order?
Thanks in advance
Robert