Microsoft Office Tutorials and References
In Depth Information
5. The existing qryDonationsAfterPickupCharge query displays the DonorID,
AgencyName, DonationDescription, and DonationValue fields for all donations that
require a pickup, along with the NetDonation calculated field that displays the
results of subtracting $8.75 from the DonationValue field value. Make a copy of the
qryDonationsAfterPickupCharge query using the new name qryNetDonations .
Modify the new query to select all records, to display the PickupRequired field, and
to sort only in descending order by NetDonation. Also, change the NetDonation
calculated field to subtract the delivery charge of $8.75 from the DonationField
value when a pickup is required and to otherwise use the DonationValue field
value. Save and run the query, and then close it.
6. Create a query to display all records from the tblAgency table, selecting all the fields
except the ContactFirstName and ContactLastName fields, and sorting in ascending
order by AgencyName. Add a calculated field named ContactName as the third col-
umn that concatenates ContactFirstName, a space, and ContactLastName. Set the
Caption property for the ContactName field to Contact Name . Save the query as
qryAgencyContactNames , run the query, resize the new column to its best fit, and
then save and close the query.
7. Create a parameter query to select the tblDonation table records for a DonationDesc
(donation description) field value that the user specifies. If the user doesn’t enter a
DonationDesc field value, select all records from the table. Display all fields from
the tblDonation table in the query recordset, and sort in ascending order by
DonationValue. Save the query as qryDonationDescParameter . Run the query and
enter no value as the DonationDesc field value, and then run the query again and
enter Cash as the DonationDesc field value. Close the query.
8. Create a crosstab query based on the qryNetDonations query. Use the AgencyName
field values for the row headings, the PickupRequired field values for the column head-
ings, and the sum of the NetDonation field values as the summarized value, and
include row sums. Save the query as qryNetDonationsCrosstab . Change the column
headings for the two rightmost columns to No Pickup and Pickup Required . Change the
format of the displayed values to Standard with two decimal places. Resize the columns
in the query recordset to their best fit, and then save and close the query.
9. Create a find duplicates query based on the qryNetDonations query. Select DonorID
and AgencyName as the fields that might contain duplicates, and select the remain-
ing fields in the query as additional fields in the query recordset. Save the query as
qryMultipleDonorDonations , run the query, and then close it.
10. Create a find unmatched query that finds all records in the tblDonor table for which
there is no matching record in the tblDonation table. Select all fields from the tblDonor
table in the query recordset. Save the query as qryDonorsWithoutDonations , run the
query, and then close it.
11. Make a copy of the qryNetDonations query using the new name
qryTopNetDonations . Modify the new query by using the Top Values property to
select the top 40% of the records. Save and run the query, and then close the query.
12. Use the Input Mask Wizard to add an input mask to the Phone field in the tblDonor
table. The ending input mask should use hyphens as separators, as in 987-654-3210,
with only the last seven digits required; do not store the literal display characters if
you are asked to do so. Update the Input Mask property everywhere the Phone field
is used. Test the input mask by typing over an existing Phone field value, being sure
not to change the value permanently by pressing the Esc key after you type the last
digit in the Phone field. Close the table.