try this...
1. Within your subform, add a rectangle the same size of the subform's detail section, and set the background color of the rectangle to the subform color, and set the border of the rectangle to the same color of your subform. This will make the rectangle appear "invisible" once you complete step 2 below.
2. With the rectangle selected, go to the Format menu, and choose Send to Back to assure all your fields are visible and are not hidden behind the rectangle.
3. Go to the On Click event of the rectangle you created and insert your code.
4. Run the form and click anywhere in the current record outside of a field and it should work. If you want it to work everywhere you click on the record you would need to enter your code in the On Click event of each field.
i hope this helps.