ahh, fosUserName needs to be in a general code module. A general code module
is one that is *not* attached to a Form, Report or other class object.
- in the VB Editor: Insert>Module. In the Properties window, rename the
module to anything *except* fosUserName. "modGeneralCode" will do.
(The module name cannnot be the same as any of its procedures/functions. Not
100% sure, but it sounds like this is the current problem, in which case,
you probably only need to rename the module.)
- copy fosUserName (and the API call) into modGeneralCode. Delete them from
anywhere else you might have put them.
Should compile now.