L
Lostguy
Hello!
Some Query Basics questions that am getting wrapped around:
a) What is better: Creating a separate query and then basing the
report off that query (report and separate query), or just creating
the query by clicking the 3 dots from the report's record source
property (report with integrated query)? I have many queries that are
only being used by one associated report, so I thought if I did the
recordsource query route, it might make my db smaller or run faster or
something since I can delete all the separate queries?
b)
tblEmployee: EmployeeIDpk, LName
tblStuff: StuffIDpk, StuffDesc
tblEmpStuff: EmployeeIDfk, StuffIDfk
If you want to see Employee wth Stuff, is it better to: Drag the LName
and StuffDesc to the query (from 2 tables), or drag the two fk's from
the tblEmpStuff (same table) to the query, and then display the fk's
as LName and StuffDesc?
c) My report shows those duties that have employees assigned to them,
and not the unassigned duties (those with null for employee info. How
to you set the criteria of "data is OK, and NULL is also OK" using the
Query Builder? Here is the SQL if that helps:
SELECT
tblExtraDuty.ExtraDuty,
tblEmployees.RateorTitle,
tblEmployees.FName,
tblEmployees.MName,
tblEmployees.LName,
tblSections.SectionName,
tblExtraDuty.ExtraDutyIDpk,
tblEmpExtraDuty.ExtraDutyDate,
tblExtraDuty.ExtraDutyIndex,
tblEmployees.EmployeeIDpk
FROM
(tblSections INNER JOIN tblEmployees ON tblSections.SectionIDpk =
tblEmployees.tblSectionsIDfk)
INNER JOIN (tblExtraDuty INNER JOIN tblEmpExtraDuty ON
tblExtraDuty.ExtraDutyIDpk = tblEmpExtraDuty.ExtraDutyIDfk)
ON tblEmployees.EmployeeIDpk = tblEmpExtraDuty.EmployeeIDfk;
??
I appreciate all the help and direction I have received from everyone!
VR/Lost
Some Query Basics questions that am getting wrapped around:
a) What is better: Creating a separate query and then basing the
report off that query (report and separate query), or just creating
the query by clicking the 3 dots from the report's record source
property (report with integrated query)? I have many queries that are
only being used by one associated report, so I thought if I did the
recordsource query route, it might make my db smaller or run faster or
something since I can delete all the separate queries?
b)
tblEmployee: EmployeeIDpk, LName
tblStuff: StuffIDpk, StuffDesc
tblEmpStuff: EmployeeIDfk, StuffIDfk
If you want to see Employee wth Stuff, is it better to: Drag the LName
and StuffDesc to the query (from 2 tables), or drag the two fk's from
the tblEmpStuff (same table) to the query, and then display the fk's
as LName and StuffDesc?
c) My report shows those duties that have employees assigned to them,
and not the unassigned duties (those with null for employee info. How
to you set the criteria of "data is OK, and NULL is also OK" using the
Query Builder? Here is the SQL if that helps:
SELECT
tblExtraDuty.ExtraDuty,
tblEmployees.RateorTitle,
tblEmployees.FName,
tblEmployees.MName,
tblEmployees.LName,
tblSections.SectionName,
tblExtraDuty.ExtraDutyIDpk,
tblEmpExtraDuty.ExtraDutyDate,
tblExtraDuty.ExtraDutyIndex,
tblEmployees.EmployeeIDpk
FROM
(tblSections INNER JOIN tblEmployees ON tblSections.SectionIDpk =
tblEmployees.tblSectionsIDfk)
INNER JOIN (tblExtraDuty INNER JOIN tblEmpExtraDuty ON
tblExtraDuty.ExtraDutyIDpk = tblEmpExtraDuty.ExtraDutyIDfk)
ON tblEmployees.EmployeeIDpk = tblEmpExtraDuty.EmployeeIDfk;
??
I appreciate all the help and direction I have received from everyone!
VR/Lost