Hi All,
I'm trying to create a module to avoid repeating the same code each time I'd like to us it.
I've created the below module called "Update" and can successfully call this module from my forms. But, when the module runs I receive an error for "Invalid Outside Procedure" with the section of my code highlighted that is referencing a form in the same database as the module.
The code errors on the first time I use "Forms![Ez Comp Form]" in the below code block:
Can you help me properly reference my forms in this module? I'm unable to see where I've gone wrong as this code works perfectly as a sub.
Thanks!
Bob
I'm trying to create a module to avoid repeating the same code each time I'd like to us it.
I've created the below module called "Update" and can successfully call this module from my forms. But, when the module runs I receive an error for "Invalid Outside Procedure" with the section of my code highlighted that is referencing a form in the same database as the module.
The code errors on the first time I use "Forms![Ez Comp Form]" in the below code block:
HTML:
Dim CurrentID As Long CurrentID = Forms![Ez Comp Form].CurrentRecord Forms![Ez Comp Form].Requery DoCmd.GoToRecord acDataForm, "Ez Comp Form", acGoTo, CurrentID Forms![Ez Comp Form].[Payroll subform].Requery Forms![Ez Comp Form].[Jobs Already Matched subform].Requery Forms![Ez Comp Form].[Final Competitor Job Selection subform].Requery
Can you help me properly reference my forms in this module? I'm unable to see where I've gone wrong as this code works perfectly as a sub.
Thanks!
Bob