Microsoft Developer
Modifying queries exercise
Harder than average exercise

This Microsoft Developer MODIFYING QUERIES exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl ACCESS VISUAL BASIC course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Changing the underlying query for a report

A full answer to this exercise is provided as part of the training course!

1) Download the files needed to start this exercise: exercise-264.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Create a query to show each player's name, together with his age (you will need to add an extra field to the Players table).
3) Set criteria for the query so that it only shows players aged between 20 and 30 .
4) Save the query as ListOfPlayers.
5) Create a new report based on the query, saving it as ListOfPlayers.
6) Create another form as shown below:
Exercise screen-shot 414 Your code will be attached to the button.
7) Now create a procedure attached to the Click event of the button on the form which:
  • Takes the values entered on the form;
  • Modifies the query's SQL property;
  • Opens the report to display the results.

Thank you for showing an interest in this Access Visual Basic training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.

All content copyright Wise Owl Business Solutions Ltd 2008.  All rights reserved..