J
JulieS
Good day,
When creating a running multi-table select query (details below) and
then using the toolbar buttons to sort data in the datasheet, records
returned by query are removed.
Tables:
tblEmployees
EmpID (PK) (Autonumber)
LastName
tblManufacturers
MfgID (PK) (Autonumber)
MfgName
tblComputers
CompID (PK) (Autonumber)
EmpID (FK)
MfgID (FK)
PurchaseDate
I've added records where an employee has multiple computers with
different purchase dates but several of the computers are by the same
manufacturer.
Original query:
SELECT tblEmployees.LastName, tblManufacturers.MfgName
FROM tblManufacturers INNER JOIN (tblEmployees INNER JOIN tblComputers
ON tblEmployees.EmpID=tblComputers.EmpID) ON
tblManufacturers.MfgID=tblComputers.MfgID;
The query correctly returns the records of employees with computers
and the name of the manufacturer of the computer. The last name -
manufacturer name combination is duplicated as expected due to an
employee having more than one computer made by the same manufacturer.
After sorting by LastName using the A-Z or Z-A buttons in the toolbar
in datasheet view of the query, records where the LastName and
Manufacturer name are duplicated disappear from the datasheet view.
Query after sorting using toolbar button:
SELECT tblEmployees.LastName, tblManufacturers.MfgName
FROM tblManufacturers INNER JOIN (tblEmployees INNER JOIN tblComputers
ON tblEmployees.EmpID=tblComputers.EmpID) ON
tblManufacturers.MfgID=tblComputers.MfgID;
If I copy the SQL of the query and create a new query, all records are
returned.
If I return to the original query and remove the Order By property in
the query's property sheet, all records are returned once again. If I
sort using the query design grid, all records are returned.
Environment:
Windows XP Pro SP-2
Access 2003 SP-3
I also get the same result using
Windows SP Pro SP-2
Access 2007 SP-1
running in VPC
I've searched google groups and have found one or two posts with the
same question but I haven't seen an answer. Does anyone have a
possible explanation?
Thank you,
Julie
When creating a running multi-table select query (details below) and
then using the toolbar buttons to sort data in the datasheet, records
returned by query are removed.
Tables:
tblEmployees
EmpID (PK) (Autonumber)
LastName
tblManufacturers
MfgID (PK) (Autonumber)
MfgName
tblComputers
CompID (PK) (Autonumber)
EmpID (FK)
MfgID (FK)
PurchaseDate
I've added records where an employee has multiple computers with
different purchase dates but several of the computers are by the same
manufacturer.
Original query:
SELECT tblEmployees.LastName, tblManufacturers.MfgName
FROM tblManufacturers INNER JOIN (tblEmployees INNER JOIN tblComputers
ON tblEmployees.EmpID=tblComputers.EmpID) ON
tblManufacturers.MfgID=tblComputers.MfgID;
The query correctly returns the records of employees with computers
and the name of the manufacturer of the computer. The last name -
manufacturer name combination is duplicated as expected due to an
employee having more than one computer made by the same manufacturer.
After sorting by LastName using the A-Z or Z-A buttons in the toolbar
in datasheet view of the query, records where the LastName and
Manufacturer name are duplicated disappear from the datasheet view.
Query after sorting using toolbar button:
SELECT tblEmployees.LastName, tblManufacturers.MfgName
FROM tblManufacturers INNER JOIN (tblEmployees INNER JOIN tblComputers
ON tblEmployees.EmpID=tblComputers.EmpID) ON
tblManufacturers.MfgID=tblComputers.MfgID;
If I copy the SQL of the query and create a new query, all records are
returned.
If I return to the original query and remove the Order By property in
the query's property sheet, all records are returned once again. If I
sort using the query design grid, all records are returned.
Environment:
Windows XP Pro SP-2
Access 2003 SP-3
I also get the same result using
Windows SP Pro SP-2
Access 2007 SP-1
running in VPC
I've searched google groups and have found one or two posts with the
same question but I haven't seen an answer. Does anyone have a
possible explanation?
Thank you,
Julie