I'm fairly inexperienced with VB and Access so I'm struggling to find a way to do this. I know that I can create a function in a module and then call that function in an event procedure. That's all well and good but what is the correct procedure to do the reverse? I want to create a macro that uses the RunCode Action for a function in my module to call a sub from a form's event procedure.
Access Help File says this:
Tip To run a Sub procedure or event procedure written in Visual Basic, create a Function procedure that calls the Sub procedure or event procedure. Then use the RunCode action to run the Function procedure.
My Sub in the event procedure is called:
Public Sub ChangeSwitch()
and I wrote this function in a module:
Function CallChangeSwitch()
Call ChangeSwitch
End Function
I get the following error:
Sub or Function Not Defined
What am I missing or doing wrong? Access says I can do this but I'm not doing it correctly. Any help would be tremondously appreciated. Thanks.
Access Help File says this:
Tip To run a Sub procedure or event procedure written in Visual Basic, create a Function procedure that calls the Sub procedure or event procedure. Then use the RunCode action to run the Function procedure.
My Sub in the event procedure is called:
Public Sub ChangeSwitch()
and I wrote this function in a module:
Function CallChangeSwitch()
Call ChangeSwitch
End Function
I get the following error:
Sub or Function Not Defined
What am I missing or doing wrong? Access says I can do this but I'm not doing it correctly. Any help would be tremondously appreciated. Thanks.