Solved

relation beetwen 2 tables

Posted on 1998-08-26
1
142 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 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