T
Tray
I have a problem, which I'm sure should be easy to resolve - but I've spent
so long looking at it that I just can't work it out now.
Part of my database is to record payments made from different employers.
Each employer pays an amount according to their individual rate (which
changes each year).
So far, I have setup 3 tables:
Employer:
employerRef (Primary Key)
employerName
employerType
Payment:
paymentID (Primary Key)
employerRef (Foreign Key)
paymentDate
paymentAmount
Rate:
employerRef (Compound Key)
paymentDate (Compound Key)
rate
Firstly, I'm not sure whether this was the best way to set it up (with the
compound key in Rate). And I can't decide how the relationships between the
Rate table and the others should be setup.
When a user inputs a new payment, I want them to select the employerRef
first and for the form to then display the employerName (for reference). This
part I managed to do by binding the form to an autolookup query with the
Employer and Payment tables.
When the user then selects the paymentYear, I want the form to display the
corresponding rate for that particular employer in that particular year. Any
guidance for how I should do this? I've played around with queries but can't
get it to work.
so long looking at it that I just can't work it out now.
Part of my database is to record payments made from different employers.
Each employer pays an amount according to their individual rate (which
changes each year).
So far, I have setup 3 tables:
Employer:
employerRef (Primary Key)
employerName
employerType
Payment:
paymentID (Primary Key)
employerRef (Foreign Key)
paymentDate
paymentAmount
Rate:
employerRef (Compound Key)
paymentDate (Compound Key)
rate
Firstly, I'm not sure whether this was the best way to set it up (with the
compound key in Rate). And I can't decide how the relationships between the
Rate table and the others should be setup.
When a user inputs a new payment, I want them to select the employerRef
first and for the form to then display the employerName (for reference). This
part I managed to do by binding the form to an autolookup query with the
Employer and Payment tables.
When the user then selects the paymentYear, I want the form to display the
corresponding rate for that particular employer in that particular year. Any
guidance for how I should do this? I've played around with queries but can't
get it to work.