I have two main tables: 'employees' and 'residences'
I have created several queries including one that lists all the employees leaving in the current year and their residences.
there are two forms, one for each table, where new info will be entered to update the tables or add new records.
the relationship is between [employee] in the 'employee' table and [occupant] in the 'residences' table
Here is my goal:
Currently, there are over 200 employees, each are assigned to a house by the company. in a given year about 80 employees leave and 80 new ones arrive. these new employees will be assigned to the houses of the recently departed employees. in the form based off of the 'employees' table i have a combo box based on the 'turnover' query that lists all the residences of the employees departing in the current year. these would be the ones available to reassign to incoming employees.
in the 'employee' table there is a [departure] field that list the day of the departure. What i have been trying to work out is removing(automatically) the names of the employees that departed on Date()-1 from the 'employees' form. for that i created an update query that just removed them from the list. then i realized that this process disturbed the housing 'turnover' query that derrived its contents from [departure] field in the 'employee' table. that criteria is set to the current year.
Also, when i add a new employee to a new address, the old occupant is still listed on the form at that address because i have not figured out how to move the old employee to the 'archive' table when a new person is assigned to that address.
how can i:
1) find a way to remove an employee from the 'employee' table to the archive table while simultaneously preserving their residence and relavant info in the 'turnover' table (again, this is based on the departure date derrived from the employee's name)
2) is there a way to eliminate a record from the 'employee' table and move it to the 'archive' table when an incoming employee is selected to live at the outgoing employees address while also transferring the [permanent_address] of the outgoing employee to the [past_address] in the archive table
to me is sounds like i need to use some complicated macros that i may need to program on my own. i would ideally like this to be as automatic as possible and maybe work off of an update query. please let me know if that is more info that i need to provide.
thanks
alex
I have created several queries including one that lists all the employees leaving in the current year and their residences.
there are two forms, one for each table, where new info will be entered to update the tables or add new records.
the relationship is between [employee] in the 'employee' table and [occupant] in the 'residences' table
Here is my goal:
Currently, there are over 200 employees, each are assigned to a house by the company. in a given year about 80 employees leave and 80 new ones arrive. these new employees will be assigned to the houses of the recently departed employees. in the form based off of the 'employees' table i have a combo box based on the 'turnover' query that lists all the residences of the employees departing in the current year. these would be the ones available to reassign to incoming employees.
in the 'employee' table there is a [departure] field that list the day of the departure. What i have been trying to work out is removing(automatically) the names of the employees that departed on Date()-1 from the 'employees' form. for that i created an update query that just removed them from the list. then i realized that this process disturbed the housing 'turnover' query that derrived its contents from [departure] field in the 'employee' table. that criteria is set to the current year.
Also, when i add a new employee to a new address, the old occupant is still listed on the form at that address because i have not figured out how to move the old employee to the 'archive' table when a new person is assigned to that address.
how can i:
1) find a way to remove an employee from the 'employee' table to the archive table while simultaneously preserving their residence and relavant info in the 'turnover' table (again, this is based on the departure date derrived from the employee's name)
2) is there a way to eliminate a record from the 'employee' table and move it to the 'archive' table when an incoming employee is selected to live at the outgoing employees address while also transferring the [permanent_address] of the outgoing employee to the [past_address] in the archive table
to me is sounds like i need to use some complicated macros that i may need to program on my own. i would ideally like this to be as automatic as possible and maybe work off of an update query. please let me know if that is more info that i need to provide.
thanks
alex