Update a table with another tables data

arey

Board Regular
Joined
Feb 14, 2006
Messages
166
Hello all,

I have what I call a "main table". It contains a lot of information that I created reports, queries, etc. from.

Now I've come to a point at which I need to create another table but want some fields in my second table to match what is in my "main table".
I need my second table to be automatically updated when ever data is entered into my main table.

Any ideas?

Thank you in advance,
T.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
Yes, don't create another table.:)

As far as I can see it's not needed, you could achieve what you want using a query, and that would be updated automatically.

If you created a new table you'd have to manually update it every time you changed data in the main table.
 

arey

Board Regular
Joined
Feb 14, 2006
Messages
166
thanks but...

if I create a query how do i get the query to update the fields in th enew table?
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
What I'm saying is don't create a new table.:)

I don't see why you need to.

Perhaps you could explain further exactly what you want to do?
 

arey

Board Regular
Joined
Feb 14, 2006
Messages
166

ADVERTISEMENT

My main table (Incident table) contains data pertaining to all on-line incidents. I now need to create another table (Incident tracking) to track the work/progression done for each on-line incident.

Both table will have about 3 to 4 columns that will have the same exact data. For instance both will contain Date of incident, Time of Incident, Description of incident. But the second table will contain will contain other fields that will have to be maunually updated.

The tables look something like this...

Incident table:
date of incident
time of incident
application
impact
subject
description
root cause

New table will contain:
date of incident
time of incident
subject
Help desk ticket #
HD status
Follow-up status
follow-up owner
estimated completion date
completeion date
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
Office Version
  1. 365
Platform
  1. Windows
You do not need to repeat the data in both tables.

In the incident table you should add a primark key, say an Autonumber field called IncidentID.

Then add a foreign key field in the second table to that links to the IncidentID.

You can then use this relationship in queries/forms/reports.
 

cordevil95

New Member
Joined
Apr 27, 2006
Messages
33
Whynot just add the new fields to the existing tables? If for some reason you are being forced to create a new table, then try the following:

Do you have an Incident ID?? Or what is your primary key in each table? If your primary key in "Incedent Table" is IncidentID then just create a field in your "New Table" called IncidentID. Open the Table Relationships and creat a relationship between the tables with the IncidentID field and click Enforce Referential Integrity. Then just create a query that shows the records where IncidentID is equal in both tables.
 

Forum statistics

Threads
1,141,203
Messages
5,704,929
Members
421,372
Latest member
Jamie11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top