ACCESS VBA MACROS EXERCISES▼
Access VBA Macros | Messages and variables exercise | Running an action query to double film run times
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.
You can learn how to do this exercise if you attend the course listed below!
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.
Try running the query called UpdateRunningTimes. You should find that it doubles the running times of all films in the table called UKFilms.
In your existing module called modSimpleMacros, create another procedure called ChangeRunningTimes.
Add code to this procedure so that it:
- Turns off any warning messages which would otherwise appear;
- Runs the query called UpdateRunningTimes;
- Turns warning messages back on again;
- Opens the table of UKFilms so you can see if your macro has worked; and
- Displays a message as shown below.
Your message should look something like this:
Here we have run the query several times 2,208 minutes of Harry Potter would be a long time
Test that your macro works, then save and close your module.