I'll try my best to describe what I need to do. I'm sure this is covered many places, but I have a hard time coming up with good search keywords.
I have two tables. Table A holds employee records (id, first & last name, position, etc), and Table B holds the employee's rate history (id, rate, date given). In Table A the employee id is the primary key, and in Table B the employee id is foreign key with an auto number the primary key. The two tables share a 1 to Many relationship.
The rate is separated from the employee record table because I need to keep a history of each rate increase, and thus allow me to run a query and see all the different rate changes any given employee has had.
There is an employee Form (based off Table A) where all edits should be done, including changes to the employee's rate. So when a user navigates to an employee the user sees all the basic employment information, along with the most *recent* rate (that is being fed from Table B). If any edits to the basic employment information are made the changes replace what was in Table A automatically, while changes to the employee's rate needs to add a new record in Table B with the date given.
I have a Query that returns the most recent rate given (1 result) based off the id field of the employee Form. I have a Subform on the employee form which displays the query's results. However, when the rate is changed it changes it in Table B and doesn't add a new record like I would need. Also, the edit doesn't change the Date Given field of the record.
I guess I could work around this with a new form pop up to add a new rate and then requery the Subform...but it's not the method I prefer.
Thoughts? Help?
Thank you.
I have two tables. Table A holds employee records (id, first & last name, position, etc), and Table B holds the employee's rate history (id, rate, date given). In Table A the employee id is the primary key, and in Table B the employee id is foreign key with an auto number the primary key. The two tables share a 1 to Many relationship.
The rate is separated from the employee record table because I need to keep a history of each rate increase, and thus allow me to run a query and see all the different rate changes any given employee has had.
There is an employee Form (based off Table A) where all edits should be done, including changes to the employee's rate. So when a user navigates to an employee the user sees all the basic employment information, along with the most *recent* rate (that is being fed from Table B). If any edits to the basic employment information are made the changes replace what was in Table A automatically, while changes to the employee's rate needs to add a new record in Table B with the date given.
I have a Query that returns the most recent rate given (1 result) based off the id field of the employee Form. I have a Subform on the employee form which displays the query's results. However, when the rate is changed it changes it in Table B and doesn't add a new record like I would need. Also, the edit doesn't change the Date Given field of the record.
I guess I could work around this with a new form pop up to add a new rate and then requery the Subform...but it's not the method I prefer.
Thoughts? Help?
Thank you.