You are here:

Using MS Access/combine fields from different tables

Advertisement


Question
Hi,
I would like to ask that how can I pick differents field from different tables and combine them in one new query??

E.g.
Table1 name id age
Table2 gender id school
Table3 id teacher hostal

pick id name school hostal,  and combine and put them in a new query.

Answer
You have to relate the tables in some way. I don't really see any relationships in what you show.

A typical school database would look like this:

tblStudent: StudentID (PK), Firstname, Lastname, DOB, Gender, etc.
tblTeacher: TeacherID (PK), Firstname, Lastname, etc.
tblCourse: CourseID (PK), Coursename
tblStudentCourse: StudentCourseID (PK), StudentID (FK), CourseID (FK), TeacherID (FK)

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.