|
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 | |
Share:
|
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 | | |
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
| | |
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
| | |
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 > >
| | |
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 > >
| | This discussion thread is closed Replies have been disabled for this discussion. Similar topics
2 posts
views
Thread by Awah Teh |
last post: by
|
11 posts
views
Thread by Grim Reaper |
last post: by
|
29 posts
views
Thread by Natan |
last post: by
|
2 posts
views
Thread by Snozz |
last post: by
|
5 posts
views
Thread by hharriel |
last post: by
|
12 posts
views
Thread by JMO |
last post: by
| | |
reply
views
Thread by DrewYK |
last post: by
| | | | | | | | | | |