I'm not sure, but try this: (I don't have VB)
dim oAccess as object
set oAccess = createobject ("access.application")
oAccess.opencurrentdatabase (...) ' <- your file here.
oAccess.Run "GetUserID"
oAccess.closecurrentdatabase
oAccess.quit
set Access = nothing
Put a temporary msgbox in your GetUserID function so you can tell if it is
being called. Make sure the function is declared as Public. If this works
(ie. you see the messagebox), then, see if the following change will give
you the value returned by the function:
print oAccess.Run("GetUserID")
No guarantees, tho!
HTH,
TC