dbTalk Databases Forums  

How to show fields with Blank entries in a relationship database.

comp.database.ms-access comp.database.ms-access


Discuss How to show fields with Blank entries in a relationship database. in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ninjaking
 
Posts: n/a

Default How to show fields with Blank entries in a relationship database. - 04-20-2004 , 12:54 PM






We have a database with various tables : Activity, Project, Employees
etc.

I notice that one of the problem with the Query we get that if it
can't find an entry in the child tables (Activity and Employees...
Project is the main one) - it doesn't list that entry.

For instance if their are no activities logged and linked to that
project number - it doesn't seem to list it. Or if their is not
Employee listed to be working on the project it doesn't list the
entry.

Here's a SQL copy of the query, though i used the Access Wizard. So
help on how to Adjust it in the Access Query would be helpful as my
SQL is majorly rusty :

SELECT Activity.ProjectID AS Activity_ProjectID, Divisions.DivisionsID
AS Divisions_DivisionsID, Divisions.DivisionName,
Activity.ActivityDate, Activity.Activity, Contacts.Company,
Contacts.BusinessStreet, Contacts.BusinessPostalCode,
Contacts.BusinessCity, Contacts.BusinessState, Employees.EmployeeID AS
Employees_EmployeeID, Employees.EmployeeComboName, Project.ProjectID
AS Project_ProjectID, Project.DivisionsID AS Project_DivisionsID,
Project.ContactID, Project.ProjectName, Project.ProjectPriority,
Project.ProjectStartDate, Project.ProjectDescription,
Project.ProjectNextSteps, Project.ProjectAmount, Project.ProjectFee,
Project.CurrencyID, Project.EmployeeID AS Project_EmployeeID,
Project.ProjectEndDate, Project.ProjectMandateDate,
Project.ProjectMandateAmount, Project.ReferralID, Contacts.LastName
FROM (Employees INNER JOIN (Divisions INNER JOIN (Contacts INNER JOIN
Project ON Contacts.ContactID = Project.ContactID) ON
Divisions.DivisionsID = Project.DivisionsID) ON Employees.EmployeeID =
Project.EmployeeID) INNER JOIN Activity ON Project.ProjectID =
Activity.ProjectID
WHERE (((Employees.EmployeeComboName)="") AND ((Project.EmployeeID) Is
Null))
ORDER BY Activity.ProjectID;


I tried using isNull Criteria and Zero Length String ( ="" ) test to
see if they pop up and they don't

Reply With Quote
  #2  
Old   
Ray
 
Posts: n/a

Default Re: How to show fields with Blank entries in a relationship database. - 04-21-2004 , 07:27 AM






adel.ather (AT) sympatico (DOT) ca (ninjaking) wrote in message news:<66700bb5.0404200954.4e6461b4 (AT) posting (DOT) google.com>...
Quote:
We have a database with various tables : Activity, Project, Employees
etc.

I notice that one of the problem with the Query we get that if it
can't find an entry in the child tables (Activity and Employees...
Project is the main one) - it doesn't list that entry.

For instance if their are no activities logged and linked to that
project number - it doesn't seem to list it. Or if their is not
Employee listed to be working on the project it doesn't list the
entry.

Here's a SQL copy of the query, though i used the Access Wizard. So
help on how to Adjust it in the Access Query would be helpful as my
SQL is majorly rusty :

SELECT Activity.ProjectID AS Activity_ProjectID, Divisions.DivisionsID
AS Divisions_DivisionsID, Divisions.DivisionName,
Activity.ActivityDate, Activity.Activity, Contacts.Company,
Contacts.BusinessStreet, Contacts.BusinessPostalCode,
Contacts.BusinessCity, Contacts.BusinessState, Employees.EmployeeID AS
Employees_EmployeeID, Employees.EmployeeComboName, Project.ProjectID
AS Project_ProjectID, Project.DivisionsID AS Project_DivisionsID,
Project.ContactID, Project.ProjectName, Project.ProjectPriority,
Project.ProjectStartDate, Project.ProjectDescription,
Project.ProjectNextSteps, Project.ProjectAmount, Project.ProjectFee,
Project.CurrencyID, Project.EmployeeID AS Project_EmployeeID,
Project.ProjectEndDate, Project.ProjectMandateDate,
Project.ProjectMandateAmount, Project.ReferralID, Contacts.LastName
FROM (Employees INNER JOIN (Divisions INNER JOIN (Contacts INNER JOIN
Project ON Contacts.ContactID = Project.ContactID) ON
Divisions.DivisionsID = Project.DivisionsID) ON Employees.EmployeeID =
Project.EmployeeID) INNER JOIN Activity ON Project.ProjectID =
Activity.ProjectID
WHERE (((Employees.EmployeeComboName)="") AND ((Project.EmployeeID) Is
Null))
ORDER BY Activity.ProjectID;


I tried using isNull Criteria and Zero Length String ( ="" ) test to
see if they pop up and they don't
Hello,

You might want to take a look are your query with the joins
that have been created using Design View. The see if your
joins are 1 to 1 joins. If so, right click on the link between
the two tables and select the type of join that will show all
records from your source table and match the records in the
joined table. Example: tblActivity to tblDivisions would be a
number 2 selection if you want to display all records from
tblActivity and those that match from tblDivisions.

This will need to be done with all joins you have in your query
so that All records from tblActivity will be displayed according
to the criteria required.

Regards,

Ray


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.