I have an embedded macro (in a form) that duplicates/appends the current record displayed by the form and I would like to add a bit of VBA code to the macro (to increment a text box value on the appended form). As I understand it, this can be done by the RunCode macro command in which a Function Name is specified. I know how to create a function in VBA (and code it to do what I want) but I cannot figure out how to associate it with the Function Name in the macro. If I create a function within the VBE (with the same name as in the macro), when the macro is executed I get the following error message: "The object doesn't contain the Automation object 'xxx'" where xxx is the name of the function. Can anyone please help with this?
I have BTW a copy of Access 2010 Inside Out which mentions one can, in a macro, "Execute other macros or execute Visual Basic functions" but it is mute as far as I can tell on how to create the function.
I have BTW a copy of Access 2010 Inside Out which mentions one can, in a macro, "Execute other macros or execute Visual Basic functions" but it is mute as far as I can tell on how to create the function.