I have a function called "Import Site Details" containing two procedures one titled "Import_Site_Details_YES_BUTTON()" and the other, imaginatively, called "Import_Site_Details_NO_BUTTON()".
I am attempting to run one of these proceduresfrom a Private Sub (which one depends on the results from a message box) using:
DoCmd.OpenModule "Import Site Details", "Import_Site Details_NO_BUTTON()" (or _YES_BUTTON())
The problem is I keep getting the error message:
Error Number'2517'
Microsoft Access cannot find the procedure "Import_Site Details_NO_BUTTON()"
"Import Site Details" isn't a private module so what's the problem? I've tried removing the "" around the module name and replacing with [] but I just get:
'Expected variable or preocedure, not module'
And if I do the same with the function name I get:
'Run time Error 2465 Microsoft Access can't find the field 'Forms' referred to in your expression.'
Any help on this would be much appreciated.
Thanks in advance.
aexley
I am attempting to run one of these proceduresfrom a Private Sub (which one depends on the results from a message box) using:
DoCmd.OpenModule "Import Site Details", "Import_Site Details_NO_BUTTON()" (or _YES_BUTTON())
The problem is I keep getting the error message:
Error Number'2517'
Microsoft Access cannot find the procedure "Import_Site Details_NO_BUTTON()"
"Import Site Details" isn't a private module so what's the problem? I've tried removing the "" around the module name and replacing with [] but I just get:
'Expected variable or preocedure, not module'
And if I do the same with the function name I get:
'Run time Error 2465 Microsoft Access can't find the field 'Forms' referred to in your expression.'
Any help on this would be much appreciated.
Thanks in advance.
aexley