473,799 Members | 2,936 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating tables in another table of the same directory

My question is based on the following scenario:

If you put two MDB files on a network share such as:

\\ServerName\Sh ared1\Main.mdb
\\ServerName\Sh ared1\Temp1.mdb

You can copy a table from Main.mdb to Temp1.mdb as follows:

From Main.mdb:
Select Field1, Field2, Field3 into Test in
'\\ServerName\S hared1\Temp1.md b'_
from qryFinal;

If Main.mdb and Temp1.mdb are copied to another directory, what would
be the syntax of the select statement -- as long as both MDB files are
in the same directory?

Any help appreciated!

RBollinger
Nov 13 '05 #1
3 1682
I just read my own post and got confused! Cheezzzzz

What I'm asking is simply: What is the VBA used to create a table in
another MDB file that is in the same directory as the first MDB file
(i.e., so the two MDB files can be placed in any directory and still
work)
The first example there are two mdb files:

Direcory C:\Shared1
Main.mdb
Temp1.mdb
From Main.mdb if you can execute:
Select Field1, Field2, Field3 into Test in _
'C:\Shared1\Tem p1.mdb' from qryFinal;

But what is the syntax if you want it to work regardless of the
directory you execute it from?

Something like ? ? ?

Select Field1, Field2, Field3 into Test in _
'.\Temp1.mdb' from qryFinal;

Thanks,

RBollinger
Nov 13 '05 #2
Use the Currentdb.Name property to determine the full path of the
current database. Parse the name to determine the path, and construct
the name of the second MDB file accordingly.

On 7 Jul 2004 13:18:39 -0700, ro*****@hotmail .com (R Bolling) wrote:
I just read my own post and got confused! Cheezzzzz

What I'm asking is simply: What is the VBA used to create a table in
another MDB file that is in the same directory as the first MDB file
(i.e., so the two MDB files can be placed in any directory and still
work)
The first example there are two mdb files:

Direcory C:\Shared1
Main.mdb
Temp1.mdb
From Main.mdb if you can execute:
Select Field1, Field2, Field3 into Test in _
'C:\Shared1\Tem p1.mdb' from qryFinal;

But what is the syntax if you want it to work regardless of the
directory you execute it from?

Something like ? ? ?

Select Field1, Field2, Field3 into Test in _
'.\Temp1.mdb' from qryFinal;

Thanks,

RBollinger

*************** *******
ja************* *@telusTELUS.ne t
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
Nov 13 '05 #3
Thank you -- brilliant solution

Jack MacDonald <ja************ **@telus.net> wrote in message news:<tm******* *************** **********@4ax. com>...
Use the Currentdb.Name property to determine the full path of the
current database. Parse the name to determine the path, and construct
the name of the second MDB file accordingly.

On 7 Jul 2004 13:18:39 -0700, ro*****@hotmail .com (R Bolling) wrote:
I just read my own post and got confused! Cheezzzzz

What I'm asking is simply: What is the VBA used to create a table in
another MDB file that is in the same directory as the first MDB file
(i.e., so the two MDB files can be placed in any directory and still
work)
The first example there are two mdb files:

Direcory C:\Shared1
Main.mdb
Temp1.mdb
From Main.mdb if you can execute:
Select Field1, Field2, Field3 into Test in _
'C:\Shared1\Tem p1.mdb' from qryFinal;

But what is the syntax if you want it to work regardless of the
directory you execute it from?

Something like ? ? ?

Select Field1, Field2, Field3 into Test in _
'.\Temp1.mdb' from qryFinal;

Thanks,

RBollinger

*************** *******
ja************* *@telusTELUS.ne t
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security

Nov 13 '05 #4

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

Similar topics

11
2202
by: Joshua Beall | last post by:
Hi All, I am working on a registration system, and one of the things I am going to need to be able to do it setup the database tables for each event that I have registration for. Normally I would do this by hand, but I am wondering if there are any code libraries out there that could generate the SQL for me. Basically I would have a list of column names and types. I know I could just foreach() through the list, with a switch to...
1
1589
by: Ed Hawkes | last post by:
I am having the following problem and any help would be GREATLY appreciated: In an application I am developing, at some points we create a new table. When I create this table on another users box, I can not access it from my box. In sql server I am dbo, but the table created by my application when run on a different box has an owner of : "FC\xxxx". I have sent permissions on this thing to public, but I am still getting an error when I...
31
3698
by: Neil | last post by:
I have an Access 2000 MDB with ODBC linked tables to a SQL Server 7 back end. I currently have a selections table in the front end file which the users use to make selections of records. The table has two fields -- primary key (which matches primary key of main, SQL Server table), and a boolean field. The table is linked to the main table in a heterogeneous inner join. I'm looking to move the table to the back end, while still giving each...
3
24039
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked tables in the database where the code resides. If we move the database with the data tables to a new directory, the links are no longer valid. I tried to update the links by changing the Connect property and refreshing: Set td = db.TableDefs(0)...
10
1642
by: cj | last post by:
I have lots of tables to copy from one server to another. The new tables have been created to match the old ones. I practiced with one table. I created the select command (select * from tableA) and Visual Basic .NET created an update command--very long as there are a lot of fields. Now there are more large tables to copy. Is there an easy way to have Visual Basic create these update commands itself for the other tables with out...
1
2720
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy for updating these tables via an ftp site: 1) Post a .mdb file to our ftp web site that contains the updated tables. My App code connects to the ftp site and gets the file name for any update files on the site. I already have code to do this...
2
3982
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: D:\original\CaseStudy-2-5\CaseStudy\Day02\exercise>asant database Buildfile: build.xml env-user: prop-user: set-user:
1
5165
by: thadson | last post by:
Hi, I'm trying to import specific cells from MS Excel 2000 spreadsheets to MS Access 2000 tables then move the spreadsheets to a different directory. I'm very new to this and I'm having trouble to implement this. I have worked out so far the code to import certain cells into 1 table, but I do not know how to import some other cells into another tables so the data would be connected and remain together. So lets say that I have 2 tables...
3
2010
by: veaux | last post by:
Adobe has WAY to many forums and I wasn't sure which was correct so thought I'd try here first. I'm trying to see if there is a product that will allow us to create a large (1,100 pg) directory, similar to creating one with MS Word. We have Access tables and want to create a healthcare provider directory. Table has ~30,000 records. We'd also want to create a master index and TOC. We want to set this up so each time we update the...
0
9686
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10250
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10222
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.