I have an Access database with two simple tables, one for equipment and one for the yearly cost of that equipment. The Equipment table is made up of PK EquipmentNumber, Location, Parent and a few other things. It is linked to the Yearcost table with EquipmentNumber as the foreign key and the PK being an autonumber, there are only two other fields in this table, Year and Cost.
The database is designed for quickly viewing historical data on the equipment we currently use and creating trends for budgeting. I have a form that works very well for this(runs a little slow on one search, but that is a question for another day).
Once a year a query is run on an Oracle database to effectively take a snapshot of this data for the year. This is then brought into Excel where it is formatted via VBA to match the Access database. After it had been foramtted and any editing done, I need the information exported to Access.
I can get the information to come into Access with either a macro from Access or Excel, but it does not update any fields that may have changed. Particularly the Location field needs to be updated, as if a piece of Equipment becomes Archived and is no longer in use, I need all instances of that piece deleted from the database.
Currently I am looking at creating a third table specifically designed for bringing in the update, comparing it to the current database, and running an update statement to update the old table's data to match the new information. Then I would run a delete to remove all the equipment that now has a location = Archived, followed by a clearing of data from the update table.
This sounds very inefficient to me, but I am having a hard time coming up with a better solution. Any help/advice would be greatly appreciated.
Aren
The database is designed for quickly viewing historical data on the equipment we currently use and creating trends for budgeting. I have a form that works very well for this(runs a little slow on one search, but that is a question for another day).
Once a year a query is run on an Oracle database to effectively take a snapshot of this data for the year. This is then brought into Excel where it is formatted via VBA to match the Access database. After it had been foramtted and any editing done, I need the information exported to Access.
I can get the information to come into Access with either a macro from Access or Excel, but it does not update any fields that may have changed. Particularly the Location field needs to be updated, as if a piece of Equipment becomes Archived and is no longer in use, I need all instances of that piece deleted from the database.
Currently I am looking at creating a third table specifically designed for bringing in the update, comparing it to the current database, and running an update statement to update the old table's data to match the new information. Then I would run a delete to remove all the equipment that now has a location = Archived, followed by a clearing of data from the update table.
This sounds very inefficient to me, but I am having a hard time coming up with a better solution. Any help/advice would be greatly appreciated.
Aren