That's right, you can't use 'Me' in a module. The easiest way around this would be to supply the Form you want to run this code against as an object parameter, then pass it in as 'Me' from the calling form.
i.e. change the function signature to Public Sub clearFields(objForm as Form), then replace all the instances of 'Me' in the function with 'objForm'. Then when you call the function from each form, just use: Call clearFields(Me)
hth
Phil
|