Access VBA Macros | Messages and variables exercise | Running a simple query to show films winning 10 Oscars

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Software ==> Access VBA Macros  (25 exercises)
Version ==> Access 2010 and later
Topic ==> Messages and variables  (8 exercises)
Level ==> Relatively easy
Subject ==> Access training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Find and double-click on the query called qryDoubleDigitOscars - it should list out the films which won at least 10 Oscars:

Multiple Oscars

The best 4 films ever made? Perhaps not.

Your task now is to do the same thing in VBA!  Read on ...

Close the query down, and create a new subroutine called ShowDDOscars (either in a new module, or one you've already created).  This subroutine should:

  1. Open the query above.
  2. Use the MsgBox command to display a message summarising the results.
  3. Close the query down.

Here's what you should see on screen:

Query message

Feel free to change the text of the message to something more in line with your own taste.

Save and close this module. 

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post