Procedure does not exist

I’m at a loss as to why the following happens, or a way to investigate the problem. When I enter the following elseif statement:

ELSEIF info(“FieldName”) = "VW Version"
Call LookUpCode

I get the following error:
“Call statement failed, procedure LookUpCode does not exist”

The procedure does exist in the same db, spelled exactly as it is printed in the error code.
What could cause this, or do you have a method I can embark upon to find the problem?

If, earlier in the procedure, you used SetActiveDatabase to make another database the active database, and you haven’t yet returned to the original database with

setactivedatabase ""

then the "same database"would be the one you named in that statement. Call statements expect the procedure you are calling to be in whichever database is active at the time.

To investigate, I would suggest you use info("databasename") in a message statement, right before the call. That will tell you which database is currently active.