Solved

relation beetwen 2 tables

Posted on 1998-08-26
1
145 Views
Last Modified: 2010-04-30
What is the best method to relation 2 tables from the same database?Give me some code please.

thanks
Alberto

0
Comment
Question by:asimoes
1 Comment
 
LVL 1

Accepted Solution

by:
JayMerritt earned 100 total points
ID: 1431108
For permanent relationships:
In native ACCESS for MDB files, there is a relationship painter that is quite nice and saves the relationships with the MDB file.  Cascade deletes are well supported.  This tool does not require code.


For SQL Server, you will need to use triggers to manage the relationships.

For temporary relationsips:
Use a SQL SELECT statement with a WHERE clause like
  SELECT *
  FROM tblTableA, tblTableB
  WHERE tblTableA.Key = tblTableB.Key

Access also has a QBE tool for painting these Inner and Outer JOINs.  You can copy the SQL from the QBE by looking at the SQL option instead of the DESIGN option.
 
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro Excel - Multiple If conditions 2 82
How to read File Date Created using VB6 8 52
Formula problem with Excel attachment 6 39
Problem to line 23 55
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question