Re: Programmatically link tables
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Fri, 06 Oct 2006 12:38:58 -0500
In addition to Albert's "harsh words", you should be aware
that any table can be joined to any **related** table simply
by using them in a query with the desired type of Join. The
query then can be used as a virtual table in any other
query/form/report.
True relationships are intended for the purpose of enforcing
referential integrity. Enforcing referential integrity
makes no sense in a situations where the relationships are
changed on the fly in a running application. The only time
where this is the right thing to do is as part of a one time
installtion process where you must add a new related table
to an existing backend database. [Well, there are a couple
of other situations, but they are rather esoteric.]
--
Marsh
MVP [MS Access]
Sarah wrote:
Thanks for the clarification Albert. I am talking about a relational join of.
data
between two tables in the same mdb file. Is there any way of doing this in
code without physically going to the Relationships screen and making the join?
"Albert D. Kallal" wrote:
"Sarah" <Sarah@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
Doe anyone know how to programmatically create a link between 2 tables and
also break a link between 2 tables?
Thank you,
Sarah
You don't create a link between two tables with code, so, the above question
is VERY VERY VERY confusing.
Normally, when you speak of a linked table, you are tabling about creating a
link to ANOTHER mdb file that contains table. When you create this link, you
are then able to use that table in the mdb file. This concept of linking
tables via code HAS NOTHING TO DO WITH linking two tables together.
If you are in need to have two tables linked, then you would build a query
in the query builder, and not use code.
You might want to clear up exactly what you are trying to do here, but you
seem to be confusing the issue of a relational joins (link two tables), and
that of creating a link in one mdb database file that points to another
table in a different mdb file.
So, are you trying to create a link in one database file that looks to
another mdb file, or are actually talking about a relation join of data
between two tables in the same mdb file?
note that the concept of linked tables *usually* refers if you split your
database. You should read the following article of mine, as I explain what
this split database, and the concept of "linked" tables are here:
http://www.members.shaw.ca/AlbertKallal/Articles/split/index.htm
- Follow-Ups:
- Re: Programmatically link tables
- From: Sarah
- Re: Programmatically link tables
- References:
- Re: Programmatically link tables
- From: Albert D. Kallal
- Re: Programmatically link tables
- Prev by Date: Re: Iterating all forms
- Next by Date: Re: Create a dropdown with room to add values to the drop down later
- Previous by thread: Re: Programmatically link tables
- Next by thread: Re: Programmatically link tables
- Index(es):
Relevant Pages
|