Microsoft Developer
Creating functions exercise
Average difficulty

This Microsoft Developer CREATING FUNCTIONS 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: Create an integer function

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

1) Download the files needed to start this exercise: exercise-249.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Create a new module called TenureAtClub.
3) Create an integer function called Tenure to calculate the number of years each player has played for his or her club using the following formula:
  • Tenure = YearEnd - YearStart
4) Incorporate the function within a query as follows:
Exercise screen-shot 392 The query should show the player, club, start year, end year and tenure
5) Save the query as Tenure and close it.

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..