I made some changes to a form module. Since I was going to repeat the steps I wanted to put it into a regular module, then call it from the form(s). Part of the code sets values on another form:
Me!Field1 = Forms!MyForm!Field1
Me!Field2 = Forms!MyForm!Field2
...
When I moved it to a regular module, I changed "Me" to reference the form. Now, all of a sudden, I get a run-time error 2113, "The value you entered isn't valid for this field" on these lines. The weird part is that I made a copy of the .mdb and the original code works fine. I continue to get the error when I moved the code back to the form module.
I don't understand what's going on here. Any help is greatly appreciated!
Me!Field1 = Forms!MyForm!Field1
Me!Field2 = Forms!MyForm!Field2
...
When I moved it to a regular module, I changed "Me" to reference the form. Now, all of a sudden, I get a run-time error 2113, "The value you entered isn't valid for this field" on these lines. The weird part is that I made a copy of the .mdb and the original code works fine. I continue to get the error when I moved the code back to the form module.
I don't understand what's going on here. Any help is greatly appreciated!