PC Review


Reply
Thread Tools Rate Thread

Create a new database with VBA

 
 
felixc36@yahoo.com
Guest
Posts: n/a
 
      2nd Mar 2005
Hi,

I have an Access 97 database and at the end of a process I want to export some
tables to new database.

What I want to do is first create a new database and then copy some tables to
this new database.

When i tried to export a table with the transferdatabase method i got an error
message since the database is not existant at the time of the transfer. So I
presume I must create a database first. Then copy the tables and queries
after.

Is this possible with Access 97?

Thank tou in advance.

Felix.
 
Reply With Quote
 
 
 
 
Roger Carlson
Guest
Posts: n/a
 
      2nd Mar 2005
Sure. On my website (www.rogersaccesslibrary.com) is a small sample
database called "ImportToTempDatabase.mdb" which illustrates how to do this
for importing data without causing database bloat. It should easily
transfer to your situation.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L

<(E-Mail Removed)> wrote in message
news:ilnVd.33528$(E-Mail Removed)...
> Hi,
>
> I have an Access 97 database and at the end of a process I want to export

some
> tables to new database.
>
> What I want to do is first create a new database and then copy some tables

to
> this new database.
>
> When i tried to export a table with the transferdatabase method i got an

error
> message since the database is not existant at the time of the transfer. So

I
> presume I must create a database first. Then copy the tables and queries
> after.
>
> Is this possible with Access 97?
>
> Thank tou in advance.
>
> Felix.



 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      2nd Mar 2005
(E-Mail Removed) wrote:
>I have an Access 97 database and at the end of a process I want to export some
>tables to new database.
>
>What I want to do is first create a new database and then copy some tables to
>this new database.
>
>When i tried to export a table with the transferdatabase method i got an error
>message since the database is not existant at the time of the transfer. So I
>presume I must create a database first. Then copy the tables and queries
>after.
>
>Is this possible with Access 97?



Check Help for the CreateDatabase and CopyObject methods.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      2nd Mar 2005
On Wed, 02 Mar 2005 18:11:30 GMT, (E-Mail Removed) wrote:

>Hi,
>
>I have an Access 97 database and at the end of a process I want to export some
>tables to new database.
>
>What I want to do is first create a new database and then copy some tables to
>this new database.
>
>When i tried to export a table with the transferdatabase method i got an error
>message since the database is not existant at the time of the transfer. So I
>presume I must create a database first. Then copy the tables and queries
>after.
>
>Is this possible with Access 97?


Yes; see the VBA help for the CreateDatabase method of the Application
object.

John W. Vinson[MVP]
 
Reply With Quote
 
felixc36@yahoo.com
Guest
Posts: n/a
 
      5th Mar 2005


Thanks everyone.... with the create database method it worked fine.





In article <(E-Mail Removed)>,
(E-Mail Removed)group wrote:
>On Wed, 02 Mar 2005 18:11:30 GMT, (E-Mail Removed) wrote:
>
>>Hi,
>>
>>I have an Access 97 database and at the end of a process I want to export some

>
>>tables to new database.
>>
>>What I want to do is first create a new database and then copy some tables to
>>this new database.
>>
>>When i tried to export a table with the transferdatabase method i got an error

>
>>message since the database is not existant at the time of the transfer. So I
>>presume I must create a database first. Then copy the tables and queries
>>after.
>>
>>Is this possible with Access 97?

>
>Yes; see the VBA help for the CreateDatabase method of the Application
>object.
>
> John W. Vinson[MVP]

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CREATE DATABASE permission denied in database 'master'. ravi.govindaraju@gmail.com Microsoft ASP .NET 0 5th Apr 2007 05:10 PM
Create a link between Access Database and Pervasive Database =?Utf-8?B?TGF2YXRyZXNz?= Microsoft Access VBA Modules 1 26th Oct 2006 09:34 PM
CREATE DATABASE permission denied in database 'master' casper Microsoft ASP .NET 0 24th Apr 2006 03:41 PM
Create new database on command from existing database =?Utf-8?B?RGFyUw==?= Microsoft Access 2 18th Dec 2005 04:56 AM
HELP- trying to create a database to create Student Progress repor =?Utf-8?B?bXJzcjg0?= Microsoft Access Database Table Design 7 24th Feb 2005 07:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:07 AM.