Ankabout
11-07-2007, 03:41 AM
Hey,
I have a database for lockers that I am trying to set up. Basically we rent lockers to students, and we want to keep a record of this in a database.
Now when a student rents a locker, a button on the form is pressed that prints a report to be signed and filed hard-copy. Once this is done, the rental is processed, and the locker is marked 'rented'.
Once a locker is being returned, the opposite should happen. On the report that is printed it should display the name of the person renting out the locker and the person that is handling the return of the locker. These persons are listed in a separate table. This gives me the following tables (some non-important fields omitted):
_Lockers
LockerNumber
IsRented
KeyNumber
_Students
StudentNumber
StudentName
_SCMembers (People handling the rentals)
MemberNumber
MemberName
_Rentals
RentalNumber
LockerNumber
StudentNumber
RentalMemberName
ReturnMemberName
In my report, I can get the name of the person printed that handled the rental. That works fine, I assume because there's a relationship between "RentalMemberName" "MemberNumber". What I can't get to work however is displaying the name of the person that handled the return. If I make another relationship the whole report doesn't work. All it shows the the (correct) MemberNumber field, not the corresponding name.
How can I solve this?
I am working on supplying the database as it is now, since there is no sensitive information in it.
I have a database for lockers that I am trying to set up. Basically we rent lockers to students, and we want to keep a record of this in a database.
Now when a student rents a locker, a button on the form is pressed that prints a report to be signed and filed hard-copy. Once this is done, the rental is processed, and the locker is marked 'rented'.
Once a locker is being returned, the opposite should happen. On the report that is printed it should display the name of the person renting out the locker and the person that is handling the return of the locker. These persons are listed in a separate table. This gives me the following tables (some non-important fields omitted):
_Lockers
LockerNumber
IsRented
KeyNumber
_Students
StudentNumber
StudentName
_SCMembers (People handling the rentals)
MemberNumber
MemberName
_Rentals
RentalNumber
LockerNumber
StudentNumber
RentalMemberName
ReturnMemberName
In my report, I can get the name of the person printed that handled the rental. That works fine, I assume because there's a relationship between "RentalMemberName" "MemberNumber". What I can't get to work however is displaying the name of the person that handled the return. If I make another relationship the whole report doesn't work. All it shows the the (correct) MemberNumber field, not the corresponding name.
How can I solve this?
I am working on supplying the database as it is now, since there is no sensitive information in it.