In design view, open the properties window for the form.
You select the form by clicking the little black box in the upper left corner, where the rulers meet.
To open the properties window, right click the object and select properties from the pop up menu.
Next, select the Event tab.
Click in the box next to Before Update.
A dropdown arrow and an elipse button will appear.
Click the arrow and select Event Procedure.
Then click the elipse button to open your code window.
Finally, type the rest of your code between the Private Sub and End Sub lines.
Randy