Re: Programmatically link tables

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for your comments Marshall. Greatly appreciated.

"Marshall Barton" wrote:

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

.



Relevant Pages

  • Re: Programmatically link tables
    ... by using them in a query with the desired type of Join. ... to an existing backend database. ... link to ANOTHER mdb file that contains table. ... this split database, and the concept of "linked" tables are here: ...
    (microsoft.public.access.formscoding)
  • Re: A really really simple report
    ... To be on the safe side, close the database, close access, then in windows ... shift key, double-click your MDB file. ... You should now see the database window, with 'Open' 'Design' and 'New' ... (Create query in design view and Create query using wizard) ...
    (microsoft.public.access.gettingstarted)
  • Re: Delete multiple mdb database fields & export 1 remaining field as plain text
    ... it works for multi-table queries (and the tables don't even have to be ... than creating a link via code, in order to run a query? ... (where Groups is the name of the table in the external database (and ... Create a permanent dummy mdb file with the query. ...
    (microsoft.public.access.macros)
  • Conversion Access MDB to ADP & MSDE 2000
    ... The prototype MDB file uses DAO, recordsets, & custom functions ... or MTD report on up to 4 buckets/metrics of the data. ... criteria for the underlying report's query. ... Since I haven't used a separate back end database before in Access, ...
    (comp.databases.ms-access)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)