More understanding on Record Source

F

Frank Situmorang

I want to make my membership database more the same as Contract database
sample of Aceess.

Normally when I built the table I make a grid query to know which fields I
want in my form.
In the contacts there is a name and will relate to calls tab on the tab
control and when we etenter the new call without filling in the contract id
on the call table, it will be automatically fill in in tghe calls table .

I see the record source of the form is this:
ntacts.Hometown, Contacts.ContactsInterests, Company.CompanyName,
Company.Address, Company.City, Company.StateOrProvince, Company.PostalCode,
Company.Region, Company.Country, Company.WebSite FROM Company RIGHT JOIN
Contacts ON Company.CompanyID = Contacts.CompanyID ORDER BY Contacts.LastName;

MY QUESTION IS WHAT IS THE DIFFERENCE BETWEEN THE ABOVE AND GRIDS QUERY,
Escpecially here using IGHT JOIN AND THEN = CONTACTS.COMPANY ID

I appreciate your help so that I can make my church membership data base
using access.

Thanks in adavance
 
B

Biz Enhancer

Hi Frank,

The RIGHT JOIN returns all records from the Contacts table and only
those records that match from the company table. Essentially the a
record can exist in the contacts table and not have a matching entry in
the company table but still be seen in the query results. A LEFT JOIN
would do the reverse - all from company table and only those from
contacts where the data is matched. If you used an INNER JOIN only data
that is in both tables will be returned.

The Join statement requires information on what fields are the same
hence "Company.CompanyID = Contacts.CompanyID". If the join does not
link similar data between the tables then the query results will be
incorrect or create a data mismatch error.

HTH,

Regards,
Nick.
 
Top