J
jkjmwilliams
I've been having a problem with billing in that when I run a query,
registrations for courses taken and billed previously show up on the query. I
am even to the point of restructuring my database to solve this problem. Even
after restructuring, these courses from previous billing periods show up.
Please tell me what I'm doing wrong. Here's what I have:
Student Info Table:
RecNum
StudID (primary Key)
all other personal info
Courses Taken Table
RecNum (Primary Key)
StuID (Foreign Key)
Course1
Course2
Course3
MethodOfStudy1
MethodOfStudy2
MethodOfStudy3
RegistrationDate1
RegistrationDate2
RegistrationDate3
I also have payment info and CompletionInfo, but my main problem is with
these two tables. When I run a query, courses that students have taken
previously and paid for previously show up. Here's the query:
SELECT PLE_StudentInfo.StuID, PLE_StudentInfo.Agency,
PLE_CoursesTaken.Course1, PLE_CoursesTaken.Course2, PLE_CoursesTaken.Course3,
PLE_CoursesTaken.Course4, PLE_CoursesTaken.Course5,
PLE_CoursesTaken.RegistrationDate1, PLE_CoursesTaken.RegistrationDate2,
PLE_CoursesTaken.RegistrationDate3, PLE_CoursesTaken.RegistrationDate4,
PLE_CoursesTaken.RegistrationDate5
FROM PLE_StudentInfo INNER JOIN PLE_CoursesTaken ON PLE_StudentInfo.StuID =
PLE_CoursesTaken.StuID
WHERE (((PLE_StudentInfo.Agency)="SECU") AND
((PLE_CoursesTaken.RegistrationDate1) Between #9/1/2008# And #9/30/2008#)) OR
(((PLE_StudentInfo.Agency)="SECU") AND ((PLE_CoursesTaken.RegistrationDate2)
Between #9/1/2008# And #9/30/2008#)) OR (((PLE_StudentInfo.Agency)="SECU")
AND ((PLE_CoursesTaken.RegistrationDate3) Between #9/1/2008# And
#9/30/2008#)) OR (((PLE_StudentInfo.Agency)="SECU") AND
((PLE_CoursesTaken.RegistrationDate4) Between #9/1/2008# And #9/30/2008#)) OR
(((PLE_StudentInfo.Agency)="SECU") AND ((PLE_CoursesTaken.RegistrationDate5)
Between #9/1/2008# And #9/30/2008#));
The results show the students entire history of courses taken in previous
months. I only want what they have taken this month. Can you help?
registrations for courses taken and billed previously show up on the query. I
am even to the point of restructuring my database to solve this problem. Even
after restructuring, these courses from previous billing periods show up.
Please tell me what I'm doing wrong. Here's what I have:
Student Info Table:
RecNum
StudID (primary Key)
all other personal info
Courses Taken Table
RecNum (Primary Key)
StuID (Foreign Key)
Course1
Course2
Course3
MethodOfStudy1
MethodOfStudy2
MethodOfStudy3
RegistrationDate1
RegistrationDate2
RegistrationDate3
I also have payment info and CompletionInfo, but my main problem is with
these two tables. When I run a query, courses that students have taken
previously and paid for previously show up. Here's the query:
SELECT PLE_StudentInfo.StuID, PLE_StudentInfo.Agency,
PLE_CoursesTaken.Course1, PLE_CoursesTaken.Course2, PLE_CoursesTaken.Course3,
PLE_CoursesTaken.Course4, PLE_CoursesTaken.Course5,
PLE_CoursesTaken.RegistrationDate1, PLE_CoursesTaken.RegistrationDate2,
PLE_CoursesTaken.RegistrationDate3, PLE_CoursesTaken.RegistrationDate4,
PLE_CoursesTaken.RegistrationDate5
FROM PLE_StudentInfo INNER JOIN PLE_CoursesTaken ON PLE_StudentInfo.StuID =
PLE_CoursesTaken.StuID
WHERE (((PLE_StudentInfo.Agency)="SECU") AND
((PLE_CoursesTaken.RegistrationDate1) Between #9/1/2008# And #9/30/2008#)) OR
(((PLE_StudentInfo.Agency)="SECU") AND ((PLE_CoursesTaken.RegistrationDate2)
Between #9/1/2008# And #9/30/2008#)) OR (((PLE_StudentInfo.Agency)="SECU")
AND ((PLE_CoursesTaken.RegistrationDate3) Between #9/1/2008# And
#9/30/2008#)) OR (((PLE_StudentInfo.Agency)="SECU") AND
((PLE_CoursesTaken.RegistrationDate4) Between #9/1/2008# And #9/30/2008#)) OR
(((PLE_StudentInfo.Agency)="SECU") AND ((PLE_CoursesTaken.RegistrationDate5)
Between #9/1/2008# And #9/30/2008#));
The results show the students entire history of courses taken in previous
months. I only want what they have taken this month. Can you help?