ste4en,
Also, another way to run the code, if you prefer, is to change the "Public Function" to "Public Sub" or "Private Sub", and just hit the "play" button on the toolbar or hit the <F5> key to run the program.
If you are going to be calling this from other Form Modules, then you would want to leave it public. But if you are just going to run it one time, or possibly another time way down the road, then it really does not matter which way you do it.
Typically, if I am just going to run something one time, I'll put it as "Private Sub", run it, and be finished with it.
Private just means that it cannot be called outside that module, whereas Public means it can be called from anywhere in the database.
Also, Function is not necessary unless you need the procedure (function) to return a value; otherwise, Sub (for Sub Procedure) is the simplest format to work with.
Someone may can argue that the Function is best, but unless necessary (such as returning a value), then it's mroe a personal preference.