Steve R.
02-26-2009, 09:19 AM
Any preference in placing VBA code within a Form versus a Module?
I have a command button that executes a program to check the database for errors. I am in the process of updating it, and the code gets "lost" by being in the form, it would be easier to see and work on if it is in a module.
It seems to me that the VBA code in a form should be short and limited to dealing with controls on the form. So if the VBA code does not meet that criteria (the error check program), a better place would be in a module. Any thoughts?
I have a command button that executes a program to check the database for errors. I am in the process of updating it, and the code gets "lost" by being in the form, it would be easier to see and work on if it is in a module.
It seems to me that the VBA code in a form should be short and limited to dealing with controls on the form. So if the VBA code does not meet that criteria (the error check program), a better place would be in a module. Any thoughts?