Automatic copy and upgrade tabel record

Magnus1982

Registered User.
Local time
Yesterday, 23:33
Joined
Apr 29, 2017
Messages
41
Hi all. I hope you will help me with small problem.

Let's say in tabel i have 5 columns .mother board,ram,HDD, graphics card ,procesor . W her i am writing down serial numbers

In a form i have this column and I use them to put data in to the table.

Every thing is great till I have rework or replace some part To Have tracebility I need to make some magic that if I will replace HDD the old number will go to other table and new one wilł jump to first tabel .it is nessesary be ouse in first tabel i need actual configuration

Any help how to do this
 
I think you need to reconfigure your tables. Let's call your existing table Systems. You need to rip those 5 fields out of that table. You would then put that data into 5 records in a new table: Components.

Assuming Systems has an autonumer primary key to uniquely identify each system. Components would look like this:

ComponentID, autonumber, primary key
SystemID, number, foreign key to Systems
ComponentInstall, date/time, date component was installed
ComponentType, short text, this will hold if its a motherboard, ram, HDD etc.
ComponentSerial, short text, this will hold the serial number

Then, to get the current components of a system you would run a subquery to get the latest ComponentInstall for each ComponentType/SystemID.

Of course, that doesn't consider the case where a component is removed but not replaced. Is that a possibility?
 

Users who are viewing this thread

Back
Top Bottom