0

Good Morning Lladies and Gentlemen:

.

I need some help in my app... I am using Access 2007 (from MS Office 2007 Pro). I have an attachment field in my customer table that holds multiple attachments. I need to preserve this data so transferring to from a spreadsheet DOES NOT work... I tried this and the attachment data is lost because Excel can not handle this kind of field.
.
What I am asking in a nutshell is...Code in Access 2007 VBA the ability to send data to another db... That is what it boils down to.
.
Say, my original db app: DB_old, and the intermediary db : DB_temp. All I would want is to copy the data from one my main db (DB_old) to the other (DB_temp), table1 in DB_old to table1 in DB_temp. Also I would need to code a way to import data from DB_temp to my new db app - DB_new...
.
Table names and structures are identical. This way when I transfer data from DB_old to DB_temp and then finally to DB_new, the attachments in the customers table's attachments field would not be lost (hopefully), and the user would not have to re-enter them...
.
So, I am looking to have a two step data transfer process from my old app to my new app:
.

  1. In my old version DB_old, have a button to send the stuff to DB_temp..
  2. Then in my updated app DB_new, have a button to get the stuff from DB_old...


.
How would I code that ? all VBA? create macros that I would call in VBA?
.
Thank you again....
.
Regards,
.
Bruce V. aka OASys1

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by ChrisPadgham
0

Read up on linked tables, you can link the tables from one database in the other then use an SQL INSERT statement in your VBA to insert the data.

Currentdb.Execute "INSERT INTO table_new (F1, F2, F3) SELECT F1, F2, F3 FROM table_old
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.