473,245 Members | 1,742 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,245 software developers and data experts.

Importing Hidden files

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
5 3119
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Awah Teh | last post by:
I am working on a project that involves importing IIS Log files into a SQL Server database (and these logfiles are big --> Some up to 2GB in size). Up until now I thought that DTS or the BULK...
11
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for...
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
2
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to...
5
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
28
by: kkadakia | last post by:
I get a daily excel file for a entire month which I want to transfer into Access at the end of the month. So, there are around 20-25 excel files I get by the end of the month, and I would like to...
1
by: Kosmos | last post by:
Hey guys, I'm fairly familiar with access by now, but I've never worked with importing text into an access database. I have some fairly large text files (lets say, for example, a folder of 20 text...
0
by: DrewYK | last post by:
I have the project that may never end in front of me. I am creating a routine that will take SpreadSheets from Excel and bring them into Access. I am not using any "DoCmd"s because the goal...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...

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.