When you did this in Access, where was the function? It wasn't calling the function from your .NET project, since how would it even know about that project, let alone load the page? Do you have the function defined in Access as a VBA function?