By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,247 Members | 1,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,247 IT Pros & Developers. It's quick & easy.

Importing Hidden files

P: n/a
If I sent a user an empty database container - dB with no tables and I
needed them to import their tables into it and one of their tables was a
hidden table with the prefix Usys, is there any way in code I can get that
table imported without them having to go to options and show hidden tables
and then import it manually?

dixie
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Tue, 21 Dec 2004 15:56:06 +1100, "dixie" <di***@dogmail.com> wrote:
If I sent a user an empty database container - dB with no tables and I
needed them to import their tables into it and one of their tables was a
hidden table with the prefix Usys, is there any way in code I can get that
table imported without them having to go to options and show hidden tables
and then import it manually?

dixie

Hi
Not sure what the problem is here, you can use DoCmd.TransferDatabase.
How is the source of the data selected, is the problem that the user
has to select a tablename which can't be seen?
David
Nov 13 '05 #2

P: n/a
Hi David,

I am having problems with the exact syntax of the docmd.TransferDatabase.

I am tyring to use DoCmd.TransferDatabase , , MyDB.MDE, acTable. I have
used many different variations based on the help file in Access 2000 which I
am finding quite confusing, but they all give me error messages.

I am basically trying to import all the tables from an Access mde database
called MyDB.MDE in the same folder as the database I am running this code
from. I am running it as an on click event from a button on a form. The
idea is that the database I running this from has no tables and I am
importing the tables from an existing database called MyDB.mde.

I need to get on top of this first. The next problem is that one of the
tables I want to import is a table that I have given the prefix USys to so
it is a hidden table. I don't want the user to have to show system files
and import it manually. Am I right in thinking that the
DoCmd.TransferDatabase command can do this?

dixie

"David Schofield" <d.***************@blueyonder.co.uk> wrote in message
news:41cb3957.657142651@localhost...
On Tue, 21 Dec 2004 15:56:06 +1100, "dixie" <di***@dogmail.com> wrote:
If I sent a user an empty database container - dB with no tables and I
needed them to import their tables into it and one of their tables was a
hidden table with the prefix Usys, is there any way in code I can get that
table imported without them having to go to options and show hidden tables
and then import it manually?

dixie

Hi
Not sure what the problem is here, you can use DoCmd.TransferDatabase.
How is the source of the data selected, is the problem that the user
has to select a tablename which can't be seen?
David

Nov 13 '05 #3

P: n/a
DoCmd.TransferDatabase acImport, "Microsoft Access" , "C:\Folder\MyDB.MDE",
acTable, "NameOfTableToImportFrom", "NameOfTableToImportTo"

Note that the database name must be in quotes, and you're far better off
using a complete path, rather than relying on CurDir pointing to the correct
location. You also need to include the name of the table from which you're
importing, and the name of the table into which you're importing, and
they're strings.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"dixie" <di***@dogmail.com> wrote in message
news:41********@duster.adelaide.on.net...
Hi David,

I am having problems with the exact syntax of the docmd.TransferDatabase.

I am tyring to use DoCmd.TransferDatabase , , MyDB.MDE, acTable. I have
used many different variations based on the help file in Access 2000 which I am finding quite confusing, but they all give me error messages.

I am basically trying to import all the tables from an Access mde database
called MyDB.MDE in the same folder as the database I am running this code
from. I am running it as an on click event from a button on a form. The
idea is that the database I running this from has no tables and I am
importing the tables from an existing database called MyDB.mde.

I need to get on top of this first. The next problem is that one of the
tables I want to import is a table that I have given the prefix USys to so
it is a hidden table. I don't want the user to have to show system files
and import it manually. Am I right in thinking that the
DoCmd.TransferDatabase command can do this?

dixie

"David Schofield" <d.***************@blueyonder.co.uk> wrote in message
news:41cb3957.657142651@localhost...
On Tue, 21 Dec 2004 15:56:06 +1100, "dixie" <di***@dogmail.com> wrote:
If I sent a user an empty database container - dB with no tables and I
needed them to import their tables into it and one of their tables was a
hidden table with the prefix Usys, is there any way in code I can get thattable imported without them having to go to options and show hidden tablesand then import it manually?

dixie

Hi
Not sure what the problem is here, you can use DoCmd.TransferDatabase.
How is the source of the data selected, is the problem that the user
has to select a tablename which can't be seen?
David


Nov 13 '05 #4

P: n/a
Thanks Douglas it was the quotes that I had wrong. I have just finished
doing my own research on the internet and I actually found on the Microsoft
site some code that allows you to download all of the objects in a database
into another one. I modified the module and played around with it until I
can get it to copy only all of the tables in one database to the same name
in the empty database as well as preserve the relationships. The only thing
is that if I have to put the path in it sort of defeats the purpose. I tied
to use (CurrentProjectPath & "MyDB.mde"), but the function is expecting a
string and won't accept this. I tried it with no path and having the 2
databases in the same folder and it did work.

dixie

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:1_********************@rogers.com...
DoCmd.TransferDatabase acImport, "Microsoft Access" ,
"C:\Folder\MyDB.MDE",
acTable, "NameOfTableToImportFrom", "NameOfTableToImportTo"

Note that the database name must be in quotes, and you're far better off
using a complete path, rather than relying on CurDir pointing to the
correct
location. You also need to include the name of the table from which you're
importing, and the name of the table into which you're importing, and
they're strings.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"dixie" <di***@dogmail.com> wrote in message
news:41********@duster.adelaide.on.net...
Hi David,

I am having problems with the exact syntax of the docmd.TransferDatabase.

I am tyring to use DoCmd.TransferDatabase , , MyDB.MDE, acTable. I have
used many different variations based on the help file in Access 2000
which

I
am finding quite confusing, but they all give me error messages.

I am basically trying to import all the tables from an Access mde
database
called MyDB.MDE in the same folder as the database I am running this code
from. I am running it as an on click event from a button on a form. The
idea is that the database I running this from has no tables and I am
importing the tables from an existing database called MyDB.mde.

I need to get on top of this first. The next problem is that one of the
tables I want to import is a table that I have given the prefix USys to
so
it is a hidden table. I don't want the user to have to show system files
and import it manually. Am I right in thinking that the
DoCmd.TransferDatabase command can do this?

dixie

"David Schofield" <d.***************@blueyonder.co.uk> wrote in message
news:41cb3957.657142651@localhost...
> On Tue, 21 Dec 2004 15:56:06 +1100, "dixie" <di***@dogmail.com> wrote:
>
>>If I sent a user an empty database container - dB with no tables and I
>>needed them to import their tables into it and one of their tables was
>>a
>>hidden table with the prefix Usys, is there any way in code I can get that >>table imported without them having to go to options and show hidden tables >>and then import it manually?
>>
>>dixie
>>
>>
> Hi
> Not sure what the problem is here, you can use DoCmd.TransferDatabase.
> How is the source of the data selected, is the problem that the user
> has to select a tablename which can't be seen?
> David
>
>



Nov 13 '05 #5

P: n/a
Look at http://www.mvps.org/access/api/api0001.htm to use the Windows Common
Dialog to select the file, with a tool that is familiar to just about every
Windows user. CurrentDB.Name returns the fully-qualified path and file name
of the current database, as an alternative.

Larry Linson
Microsoft Access MVP

"dixie" <di***@dogmail.com> wrote in message
news:41******@duster.adelaide.on.net...
Thanks Douglas it was the quotes that I had wrong. I have just finished
doing my own research on the internet and I actually found on the Microsoft site some code that allows you to download all of the objects in a database into another one. I modified the module and played around with it until I
can get it to copy only all of the tables in one database to the same name in the empty database as well as preserve the relationships. The only thing is that if I have to put the path in it sort of defeats the purpose. I tied to use (CurrentProjectPath & "MyDB.mde"), but the function is expecting a
string and won't accept this. I tried it with no path and having the 2
databases in the same folder and it did work.

dixie

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:1_********************@rogers.com...
DoCmd.TransferDatabase acImport, "Microsoft Access" ,
"C:\Folder\MyDB.MDE",
acTable, "NameOfTableToImportFrom", "NameOfTableToImportTo"

Note that the database name must be in quotes, and you're far better off
using a complete path, rather than relying on CurDir pointing to the
correct
location. You also need to include the name of the table from which you're importing, and the name of the table into which you're importing, and
they're strings.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"dixie" <di***@dogmail.com> wrote in message
news:41********@duster.adelaide.on.net...
Hi David,

I am having problems with the exact syntax of the docmd.TransferDatabase.
I am tyring to use DoCmd.TransferDatabase , , MyDB.MDE, acTable. I have used many different variations based on the help file in Access 2000
which

I
am finding quite confusing, but they all give me error messages.

I am basically trying to import all the tables from an Access mde
database
called MyDB.MDE in the same folder as the database I am running this code from. I am running it as an on click event from a button on a form. The idea is that the database I running this from has no tables and I am
importing the tables from an existing database called MyDB.mde.

I need to get on top of this first. The next problem is that one of the tables I want to import is a table that I have given the prefix USys to
so
it is a hidden table. I don't want the user to have to show system files and import it manually. Am I right in thinking that the
DoCmd.TransferDatabase command can do this?

dixie

"David Schofield" <d.***************@blueyonder.co.uk> wrote in message
news:41cb3957.657142651@localhost...
> On Tue, 21 Dec 2004 15:56:06 +1100, "dixie" <di***@dogmail.com> wrote: >
>>If I sent a user an empty database container - dB with no tables and I >>needed them to import their tables into it and one of their tables was >>a
>>hidden table with the prefix Usys, is there any way in code I can get

that
>>table imported without them having to go to options and show hidden

tables
>>and then import it manually?
>>
>>dixie
>>
>>
> Hi
> Not sure what the problem is here, you can use DoCmd.TransferDatabase. > How is the source of the data selected, is the problem that the user
> has to select a tablename which can't be seen?
> David
>
>



Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.