The code looks aok to me (at least in the relevant parts).
Here's what I personally would do next.
(1) Debug.print the content of DBWorkgroupPathName immediately before
the Set DaoDBEngine line, to ensure that it contains what you expect.
Be sure to check for leading or triling spaces that might have snuck in
somehow. For example, debug.print ">"; DBWorkgroupPathName; "<"
(2) If the name is correct but it still doesn't work, copy that
workgroup file to the local PC & amend the pathname accordingly, & see
if that works. (I'm not suggesting this as a permanent fix. It's just
to see whether the problem is something to do with the workgroup file
being on a different PC.)
(3) If it still doesn't work, open Access "manually" against that
workgroup file, & ensure you can indeed log on using the
*case-dependent* username/password that you are using in your code. If
you can't - there's your problem. If you *can*, debug.print the current
workgroup file name (I think it's a SysCmd value), to ensure that you
are indeed logged in to the file you expect.
I'm confident that with some suitable investigation (like the
suggestions above), you will get it working properly.
HTH,
TC