I have 3 tables.
Table 1 has data on associations (ie-condos). Its primary key is association id
Table 2 has a secondary key of association ID.
Table 2 has a field for meter id and meter location. and usage amount , time period etc.
Table 2 is where the user will type in the usage data for the correct meter when he has the utility bill.
I created a 3rd Table,also with a secondary key of Association ID. This is because for any location, the meters (and meter IDs) are replaced periodically so the meter IDs will change. Of course the meter location stays the same.
Table 3 has the meter Id, meter location and date placed in service
So in Table 2 I want the user to be able to select , only for his association ID, the meter location that has the most recent date of being placed in-service. Table 2 should be populated with the meter ID associated with the selected meter location.
Hope this is clear. Not sure how to implement TIA