Thank you for your response. I print everything you write out and refer back
to it often!
I have been struggling all day with the creation of queries, forms and
reports.
For example, if I want a form in which I can enter/view family information,
student information and contact (phone numbers, etc.) information... is this
possible?
Possible and perfectly routine.
The trick is - it's not just "a form" based on a complicated Query;
it's a Form with Subforms, each based on a table or a simple,
one-table query! THat is, you'ld have a Form for Families, with a
subform for Students, and probably a second subform for Phones, and so
on.
I tried to create queries for these things, but it doesn't seem to work.
Then, when I create the form, it doesn't ask if I want a sub-form. I'm using
the wizard.
Well... you're getting into some forms that may be more sophisticated
than the wizard knows about. You can use the Subform tool on the
toolbox to add a new subform (rather than trying to get the wizard to
create this entire multi-table form in one go), or you can create a
(say) Phones subform, and simply drag it off the Forms window onto
your mainform.
I then re-checked my relationships and enforced referential integrity where
I thought I should, but again, I'm a bit lost.
RI has a rather distant relationship to forms design... but it's only
distant. You do need to get your RI correct (for data integrity), and
having RI set will (for example) automatically bring in the right
fields for Master/Child Link Fields, but RI by itself won't build a
form for you!
Here is what the tables look like at this point, with their pks, fks, etc.
You're probably sick to death of this, but you have no idea how grateful I am
for your patience, expertise and advice.
Ok, let's check it out:
I'm supposed to have this finished by Friday and my nerves are starting to
fray.
I need reports such as:
Deposit slips that list cash and cheques per course code
Not hard, create a Query on all the relevant tables and use the
Report's Sorting and Grouping to group by Deposit Slip and then by
Course Code. Use the section headers and footers to display totals per
course and grand totals per deposit slip.
Student labels with just their names (that should be easy)
Yep said:
Family labels with name and address
Student List
Family List
List of students per subject
Total of students per subject
Overdue payment report
And so on... I think if I can figure out just how to put together one
query, form, report on one of these, I will be able to do the others...
See above. I used to do all sorts of complicated Reports and
Subreports but now I find that the Sorting and Grouping is VERY
capable of most of these kinds of things.
Thanks so very much!
* * denotes primary key; * denotes foreign key
Table : FamilyInfo
**FamilyID
Address1
Address2
City
Province
PostalCode
Is this Canadian province or what? You might want a small table of
Provinces (with the text code and the province name) just for ease of
creating a combo box on your form.
Table: PhonesAndEmails
**PhoneID
*FamilyID (one-to-many with referential integrity enforced)
ContactLastName
ContactFirstName
RelationshipToStudent
PhoneNo
PhoneType
Emergency (yes-no)
E-mailAddress
ok... these might be contacts who do not live with the student? Will
you need to know THEIR addresses?
Table: Students
**StudentID
*FamilyID (one-to-many with referential integrity enforced)
StudentLastName
StudentFirstName
DOB
SchoolGrade
NameOfSchool
ok
Table: ParentMeetings
**MeetingID
*FamilyID (one-to-many with referential integrity enforced)
*StudentID (one-to-many with referential integrity enforced)
DateOfMeeting
ParentAttendee1
ParentAttendee2
Student1Present
Student2Present
Student3Present
Student4Present
Notes
I’m not sure if this makes sense. Each ParentMeeting will be with only one
family with up to 4 of their children attending, so need names of students in
addition to names of parents.
well... this is non-normalized and will be harder than it needs to be
to search. If you want to find out all the meetings that Janie Smith
attended, you'll need a more difficult search of four fields. Take
another look at my prior suggestion of a one to many relationship from
ParentMeetings to MeetingAttendees.
Table: ReportTypes
**ReportTypeID
ReportType
Table: StudentNotesAndReports
**NoteReportID
*StudentID (one-to-many with referential integrity enforced)
*ReportTypeID (one-to-many with referential integrity enforced)
ReportDate
Notes
good - if a Report is always about a single student
Table: CourseInfo
**CourseID
CourseName
MonthlyRate
SpecialRate
Table: CourseDetailsPerStudent
**StudentID
**CourseID
(The StudentID and CourseID are combined pks, with but I don’t know if this
is right and am unsure of the relationship between these fields and the
Student and Course tables)
The StudentID is a Foreign Key to Students; the CourseID is a Foreign
Key to CourseInfo; they jointly constitute the one and only Primary
Key; and the design is precisely correct.
RegistrationDate
RegistrationFee
TuitionFee
DiscontinuedDate
VacationDate
Table: Awards
**AwardID
AwardName
AwardDescription
Table: StudentAwards
StudentID (one-to-many with referential integrity enforced)
AwardID (one-to-many with referential integrity enforced)
AwardDate
Comments
Yep
Table: PaymentInfo
**PaymentID
*FamilyID (one-to-many with referential integrity enforced)
Mode
Date
Amount
ChequeNo
Table: PaymentAllocation
*PaymentID (one-to-many with referential integrity enforced)
*DepositID (not sure what relationship should be or if ref. int. should be
enforced)
Each Deposit presumably contains multiple PaymentAllocation records...
I'm a little vague about how these are related in real life though!
*CourseID (not sure what relationship should be or if ref. int. should be
enforced)
Are payments ALWAYS course related? You can leave a foreign key blank
but you cannot leave a primary key (or any field in a primary key)
null.
*StudentID (not sure what relationship should be or if ref. int. should be
enforced)
again... do you need to allocate payments (or parts of payments) to
students? If so, yes, enforce RI one to many.
Amount
Table: DepositInfo
**DepositID
DepositNumber
DepositDate
Hope this gets you done by Friday! I think it should; your table
design looks great and you're well on the way with forms and reports.
John W. Vinson[MVP]