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

Dynamic Linking of Tables at Runtime

16
I have inherited a number of ship databases in MS Access, all with a very similar front end, each linked to two mdb files, one containing Baseline Data and one containing Working Data. I want to create a single front end which will allow me to access the Baseline and Working data for each ship by, say clicking a button with the ships name on it, but I can't find how to dynamically link the tables in VBA. It seems logical that tables can be linked at runtime but I just can't find a command that will allow me to do it. Has anyone any ideas?

Many Thanks In advance

ffripp
Jan 7 '13 #1

✓ answered by Seth Schrock

See the following link: Is it possible to store the location of the backend database in a table?

Seeing as how you have two backends, you might want to create a table that lists all of your split tables and their location and loop through that table when you want to check where it is so you can connect to the different locations.

Just curious, why do you need the tables to be dynamically linked in VBA? Access stores the linking information on its own and as long as the backend location doesn't change, it will remained linked without any VBA involved.

4 3897
Seth Schrock
2,965 Expert 2GB
See the following link: Is it possible to store the location of the backend database in a table?

Seeing as how you have two backends, you might want to create a table that lists all of your split tables and their location and loop through that table when you want to check where it is so you can connect to the different locations.

Just curious, why do you need the tables to be dynamically linked in VBA? Access stores the linking information on its own and as long as the backend location doesn't change, it will remained linked without any VBA involved.
Jan 7 '13 #2
ffrippy
16
Thanks for your response Seth,I'll have a go at creating a table listing the split tables based on the code you have provided.

Each of the Backend pairs contain exactly the same tables (same names) but with different data. There are 10 ship databases, and the least work option seemed to be to leave the tables alone and just link them as required.

Many Thanks


ffripp
Jan 7 '13 #3
Seth Schrock
2,965 Expert 2GB
If the names of the tables are the exact same, then all you would need is a table with a list of possible locations. You would then have a combo box that would allow you select which location you want to connect to. You might have to disconnect from the previous location before you can connect to the new location, but I'm not sure.

This seems like a really strange design. I think it would be easier to combine the information from like table names into one table. If separation is needed, then add a Category field so that all the records from location 1 would have a category of "Location 1" and all the records from location 2 would have a category of "Location 2". Then you wouldn't have to worry about the relinking.
Jan 7 '13 #4
NeoPa
32,556 Expert Mod 16PB
The link should provide full details of how to handle the technical side of that. What you need to do now is to decide when you want the links to change and what should trigger that. This will determine where the new code should go in your project.
Jan 7 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeff Hagelberg | last post by:
I'm trying to create a python module which can be used by a python interpreter embedded inside a fortran program I have. To do this, I first created python wrappers for all the functions in my...
0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
18
by: Mark P | last post by:
I have a bit of vb code that uses Tables.Append to programatically link tables from Oracle and DB2 datasources. The problem I am having on some client machines is that the link will take anywhere...
2
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group that all Access users are a member of. I added...
1
by: deiopajw | last post by:
I have a Back end database on a network drive. The copies of the front end are located on individual pc's (in their C drive). The problem arises when a laptop user naturally hooks up to the...
11
by: Sean M. DonCarlos | last post by:
I have an unmanaged Win32 app that looks up the name of a DLL (unknown at compile time) from an external location, loads it with LoadLibrary, and then uses GetProcAddress on three exported...
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
1
by: bhobbs | last post by:
We have a PostgreSQL database that contains several linking tables (all they contain is two foreign keys to link 2 other tables together). Is it necessary and/or advisable to specify the two...
1
by: Rajeshwaran | last post by:
Hi, I have an application which uses 4 libraries.(cppunit, factory, awscomm, pthread) I need to statically link the cppunit library and dynamically link the other libraries. Is this possible?...
0
by: shanmuganeo | last post by:
we created a web page with dynamic linking...the page load event contains the code for creating dynamic linkbuttons.here lies our problem... the question is how to create event handler for the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.