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

TransferDatabase problem

Thanks in advance,

I am automating copying tables from one database to another.
Everything works fine except on the tables I want only the structure I
put the word "True" (to transfer only the structure) instead of
"False". The code runs, tables appear perfectly, except I still get
tables with data when I type "True". Here's my syntax / code and it all
works except the true has no effect:

DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\Documents and Settings\dcampbe\Desktop\Copies of
Apps\Master_MI.mdb", acTable, "tblCustomer", "tblCustomer", True

Any ideas?
Thanks!!! Brian

Dec 27 '05 #1
5 2394
<ca***************@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Thanks in advance,

I am automating copying tables from one database to another.
Everything works fine except on the tables I want only the structure I
put the word "True" (to transfer only the structure) instead of
"False". The code runs, tables appear perfectly, except I still get
tables with data when I type "True". Here's my syntax / code and it all
works except the true has no effect:

DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\Documents and Settings\dcampbe\Desktop\Copies of
Apps\Master_MI.mdb", acTable, "tblCustomer", "tblCustomer", True

Any ideas?
Thanks!!! Brian


Are you absolutely sure tblCustomer does not already exist when you run the
code? If it does, the code will create another table named tblCustomer1
(2,3,etc) and you might be opening 'tblCustomer' unaware that it was not
created by the code you just ran.
Dec 27 '05 #2
I double-checked and the table doesn't exist before the transfer....
Anthony England wrote:
<ca***************@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Thanks in advance,

I am automating copying tables from one database to another.
Everything works fine except on the tables I want only the structure I
put the word "True" (to transfer only the structure) instead of
"False". The code runs, tables appear perfectly, except I still get
tables with data when I type "True". Here's my syntax / code and it all
works except the true has no effect:

DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:\Documents and Settings\dcampbe\Desktop\Copies of
Apps\Master_MI.mdb", acTable, "tblCustomer", "tblCustomer", True

Any ideas?
Thanks!!! Brian


Are you absolutely sure tblCustomer does not already exist when you run the
code? If it does, the code will create another table named tblCustomer1
(2,3,etc) and you might be opening 'tblCustomer' unaware that it was not
created by the code you just ran.


Dec 28 '05 #3
<ca***************@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I double-checked and the table doesn't exist before the transfer....
Anthony England wrote:
<ca***************@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
> Thanks in advance,
>
> I am automating copying tables from one database to another.
> Everything works fine except on the tables I want only the structure I
> put the word "True" (to transfer only the structure) instead of
> "False". The code runs, tables appear perfectly, except I still get
> tables with data when I type "True". Here's my syntax / code and it all
> works except the true has no effect:
>
> DoCmd.TransferDatabase acImport, "Microsoft Access", _
> "C:\Documents and Settings\dcampbe\Desktop\Copies of
> Apps\Master_MI.mdb", acTable, "tblCustomer", "tblCustomer", True
>
> Any ideas?
> Thanks!!! Brian


Are you absolutely sure tblCustomer does not already exist when you run
the
code? If it does, the code will create another table named tblCustomer1
(2,3,etc) and you might be opening 'tblCustomer' unaware that it was not
created by the code you just ran.


I have just double-checked the code works OK on my system (Acc XP).
Another shot in the dark ...Is tblCustomer local to Master_MI.mdb (i.e. not
a linked table)?
If it is still not working, then maybe this is a bug I am not aware of - but
I did do a quick Google but found nothing on this. Perhaps post back with
further details:
Access version?
Jet SP?
mdb/mde/adp/etc?
Any security? user-level, db password, etc?
Does code compile/ no missing references?
Can you replicate this on another machine?
Dec 28 '05 #4
Anthony England wrote:
I have just double-checked the code works OK on my system (Acc XP).


Same here for Acc 2003.

TransferDatabase has been troubled with bugs and misinformation in the
Help files over the years, but this is new to me (to my memory at
least).

If OP doesn't need indexes I suggest he accomplish task with SQL.

Dec 28 '05 #5
Access 2000, Code compiles fine, tables are linked from my "transfer
from DB" to a master database (also Access). I tried to code the path
to the Master database instead of the Master_MI, but that didn't work
either. None are .mde's. No passwords.

Dec 28 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jer | last post by:
I am trying to export the results of a view from an .adp to an .mdb using TransferDatabase. The code I am using is DoCmd.TransferDatabase acExport, "Microsoft Access", _...
0
by: KJones | last post by:
Here is the setup There are three Machines all running Access97 & XP Pro \\readingtill1 \\redingback \\redingtill2 on a LAN And four dbs
6
by: dixie | last post by:
I am using the Docmd.TransferDatabase to transfer part of a table into another smaller database. The source comes from a select query that transfers the part of the table that I need. The...
2
by: Pachydermitis | last post by:
Hi all, I am trying to use transferdatabase to link tables to a shared backend. If someone is already using the back end, transferdatabase tries to lock the table and causes an error. Is there...
1
by: Jens Hofmeier | last post by:
Hello, i want to transfer a table from database sourceMDB to a password protected database named destMDB. I was not able to figure out where to specify the required password ind the parameters...
6
by: Dave Gehrig | last post by:
Hi guys, Using Access 2003 on XP. First time caller, long time listener. I am not a programmer per se, and all my training in coding in the past year or so has come from the wealth of info...
1
by: Danny J. Lesandrini | last post by:
Does anyone know if it's possible to use TransferDatabase to export data to MySQL? If not, how would one go about it? Below is the code I tried to use, but it doesn't work. sTable = "tblLead"...
0
by: rdemyan | last post by:
I'm trying to use TransferDatabase to transfer tables from an external secured DB to a database created in the code. I would like to kind of use automation, although OpenCurrentDatabase apparantly...
3
by: Mogsey | last post by:
Dear All, I have what is likely to be a very small problem for an Access guru, connecting to an ODBC database in VBA in Access 2002. I recieve an error code of 3151 ODBC Connection to...
3
by: chris.spano | last post by:
I'm running Access 2003 on an XP machine, and there are multiple developers who are working on different "assignments" of our large database project. We all work on a local copy and export changes...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.