Nov 09 2021 05:32 AM
Hi
I am trying to automate excel file using Microsoft access. I am using macros for that, but I am not able to get the required output.
I have created one public function in microsoft access and now I am using that function as a "autoexec" macro in access db, but as i am trying to run that macro it is showing that function name not found.
Now when I am trying to use this function inside the macro, I am getting error
And i am getting the below error
So what should i do not to get rid of this error
any help would be appreciated
Nov 09 2021 06:34 AM
One common reason for that particular error is that there is a missing reference. Does your code compile?
Nov 09 2021 10:18 AM
how to check whether my code is getting compiled or not
Nov 09 2021 10:57 AM
Open the VBE and select Debug. Then click on "Compile YourDatabaseNameAppearsHere"
If there is a problem, it'll quickly throw an error.
Also look for missing references here:
Any missing or incorrect references will be flagged as "Missing".
Nov 09 2021 08:10 PM - edited Nov 09 2021 08:11 PM
@George HepworthI have checked and compiled but there is no error and no missing references is there.
Nov 10 2021 06:50 AM
Nov 10 2021 07:03 AM
Nov 12 2021 05:15 AM
Nov 15 2021 08:15 PM - edited Nov 15 2021 09:47 PM
The actual macro is
I am using this function for fetching the data but not getting the required output
Nov 16 2021 06:24 AM
Unfortunately, it's not possible to diagnose this problem with the limitations imposed by the static posts in this discussion. Nothing appears to be out of the ordinary. The problem occurs during runtime, which we can't watch.
It might help if you can upload a sample copy of the accdb as an attachment, with just enough sample data to see how it's supposed to work.
Nov 16 2021 06:26 AM
Dec 02 2021 12:22 PM
What is the name of the Module that the Function is contained within?
Make sure you do not have a Function inside a Module of the same name, it will result in Error 2425.
-Verify that the Module name and Function name are different.