3 Replies - 7113 Views - Last Post: 19 January 2009 - 07:13 PM Rate Topic: -----

#1 gloring  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 19-January 09

Copy Data From One Table to other Table

Posted 19 January 2009 - 08:16 AM

Hi,

Currently using VB 2008 with MS Access 2003.

I have Two Tables with Names - " Company_Data" & "User_Data" in which i have the following columns.....

Company_Data

Name|Age|Department|Salary

User_Data

Name|Age|Department|Updated On

Now, Is there any code that can do the following:

when i select a name in the combo box on the form (The list in the combo box is from the Name in the Company_Data table) and click update.

It should copy the Details of the Record from Company_Data to User_Data with the current date in "Updated on" column.

Please Note that the columns are not exactly Same. (Salary is not necessary in the User_Data)


Thanks for your help.

Is This A Good Question/Topic? 0
  • +

Replies To: Copy Data From One Table to other Table

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,545
  • Joined: 12-June 08

Re: Copy Data From One Table to other Table

Posted 19 January 2009 - 11:57 AM

Why would you ever really want to do this?

Yes.. a basic 'update' statement would take care of what you need.. of course fitting it for each table.

let me rephrase that and say 'why would you want the same data in two locations? that would cause potential disconnects of data. it would be best to have it all in one location'.

This post has been edited by modi123_1: 19 January 2009 - 01:07 PM

Was This Post Helpful? 0
  • +
  • -

#3 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Copy Data From One Table to other Table

Posted 19 January 2009 - 05:51 PM

Maybe for backup database?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,545
  • Joined: 12-June 08

Re: Copy Data From One Table to other Table

Posted 19 January 2009 - 07:13 PM

backing up would be the data and tables cloned.. this is shifting data from one table to a different table for.. editing?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1