473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Automated Export and Import routines from within Access via command button

3
Hello ...

I have an Access 2007 app, and I need a routine to export all table data, and then import this table data into a new version of my compiled stand alone executable Access app.

I came across a situation that halted using spreadsheets as an intermediary. My customer table contains a field called "attachments" which holds.... yeah you guessed it.... attachments ! : - )
.
I lose the attachments when exporting to the spreadsheet.... so I can not use spreadsheets in my export/import for at least my customer table...
.
I do not want to split my db into a front end and a back end.....
.
My desire and hope is for anyone that would care to share their knowledge and a bit of VBA code:
.
... Is there a way to export the data to another db say, containing identical tables... (with the db under a diff name obviously.)
.
Actually what I am asking is...Is there a way to code in VBA (behind a command button) the ability to send data to another db... Say, my original db app: DB_old and the intermediary db : DB_temp.

All I would want is to copy the data from my old version db (DB_old) to another (DB_temp), table1 in DB_old to table1 in DB_temp.

Then I would also need to code a way to get data from DB_temp to my new db app, DB_new. So from within DB_new, I would click a button and it would import (copy) data from table1 in DB_temp to table1 in DB_new
.
How would I code that ? all VBA? create macros that I would call in VBA?
.
As I mentioned, I would like to have buttons that my user would click to transfer data from an old version of my compiled app to a new version of the db app via the intermediary db, DB_temp.
.
Thank you in advance....
.
Regards,
.
Bruce V. aka OASys1
Feb 4 '12 #1
3 2106
NeoPa
32,556 Expert Mod 16PB
You're almost there already Bruce. Just have some linked tables to your intermediary database. The export would consist of appending the data from your main database into the linked tables, and the import would consist of appending the data from the linked tables into your main database. It's an even easier, and more straightforward, approach than using Excel.
Feb 4 '12 #2
OASys1
3
Thank you NeoPa,

I am going to try what you suggest....

I am curious... presently I have my db app locked tighter than .... well let's say its tight... No way the user can get to the db objects. I compiled it to an 'accde' and changed the extension to 'accdr'.

Can I do the same for my intermediary db to keep it tight and secure... make it an 'accde' ? and still do the importing and exporting with the linked tables method you talk of ?

Regards,

Bruce V. aka.. OASys1
Feb 4 '12 #3
NeoPa
32,556 Expert Mod 16PB
If you set up a databse password for your transfer database then the linked tables will need to be set up with that password. This will be visible as part of the linked tables' .Connect string, but that requires knowledge of said .Connect string, first of all, and also access to it, which I expect you are already restricting for other users.

I expect you can ensure those ducks just keep on a-waddling ;-)
Feb 4 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sam | last post by:
Trying to change the visible property on a command button (access97) based on a record felid on the form. The felid is a check box felid and I am trying to make the button disappear with the...
2
by: Mr. Bungle | last post by:
When importing excel from access I am fully aware that one can import directly into a table. Can you get as specific via code or something to import data from an excel sheet to a FORM (Not Table)...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
0
by: rcoutts | last post by:
I have a custom Access database that is a bulk mailing program for my small business to send emails to my customers (not spam!). Before sending mail, I export a folder in Outlook to an Access MDB...
24
by: questionit | last post by:
Hi I am new in Ms Access I need to know how can i create a command button on a form. When it is clicked, a table is opened that is associated to the data in a field i have. E.g: if (...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
3
by: gra | last post by:
Hi Access 2002 I have a Command Buton using some VB code to open an Excel spreadsheet. However, when the spreadsheet opens it doesn't refresh the data. The spreadsheet is a pivot table which...
1
by: tymperance | last post by:
I have a 2007 database that I need to add a command button that will open a new Outlook task and allow the user to input the assignment, start date, due date, etc. I've got plenty of code scripting...
7
by: bherring | last post by:
I have a form called allpayments that allows for data entry to a table called CUST_PAYMENTS. On the form I only have certain fields from the table. PAT_ID, TRNSDT, TRNSCD, AMNT. now in SQl I have a...
5
by: Jinzuku | last post by:
Hi, I'm trying to map an export function to a command button to my Access form (called Results). However, I would like it so that the "Save As" window appears when I try to export the table so...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.