The northwind example has a differnt name. When you use function code, you
have to use the NAME THAT YOU give the function. In the northwind exmaple,
the fucntion is called
IsLoaded
not called
fIsLoaded
So, simply change your code to:
If IsLoaded("Contacts") = True then
DoCmd.Close acForm, "Contacts"
End If
The above code should work. So, just carefully check the name of the
function you copied. You can change the name of the function to whatever you
want, but then all code will have to match.
Also do a save and compile all, as this will check the names for you
*before* you try and run your code.