G
Guest
I have two tables. One, "Units," contains an inventory of units (primary key
is a "Unit ID") and the other, "Inspections," is a record of inspections
performed on the units (primary key is "Inspection ID" and the field also
contains the Unit ID of the unit to relate the tables to each other. The
unit may have been inspected more than once, so there are multiple occurances
of the "Unit ID" in the inspections table.
I'd like to create a query that contains the following:
1) One (and only one) instance of each unit in inventory.
2)
-a- Only the LAST date that the unit was inspected, if it has been inspected.
-b- The string, "Not Inspected Yet", if it hasn't been inspected
I'm used to using php and mySQL, and I'm a newbie at Access. In php, I'd
create a primary query and a while loop to populate an array with the units,
and then a secondary query and loop with a conditional in it to determine the
inspection status.
How to I accomplish this in Access? Have I designed the database incorrectly?
is a "Unit ID") and the other, "Inspections," is a record of inspections
performed on the units (primary key is "Inspection ID" and the field also
contains the Unit ID of the unit to relate the tables to each other. The
unit may have been inspected more than once, so there are multiple occurances
of the "Unit ID" in the inspections table.
I'd like to create a query that contains the following:
1) One (and only one) instance of each unit in inventory.
2)
-a- Only the LAST date that the unit was inspected, if it has been inspected.
-b- The string, "Not Inspected Yet", if it hasn't been inspected
I'm used to using php and mySQL, and I'm a newbie at Access. In php, I'd
create a primary query and a while loop to populate an array with the units,
and then a secondary query and loop with a conditional in it to determine the
inspection status.
How to I accomplish this in Access? Have I designed the database incorrectly?