Alright, I need to open another database from my VB code, but I need to specify the workgroup file in the call. I do know that the command-line prompt for what I want to do goes like this:
I've been trying to work with the ShellExecute API function, but I can't seem to get it to work. Here's my latest attempt:
This seems to get me into my database alright, but it's not using the workgroup file I specify. Could someone help me with the syntax? Or tell me another way to do this? Thanks in advance.
Code:
"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Database\Database.mdb" /wrkgrp "\\hif-fslao-11\Equipment\Database\Workgroup.mdw"
Code:
retval = ShellExecute(Application.hWndAccessApp, "open", "C:\Database\Database.mdb", "/wrkgrp '\\hif-fslao-11\Equipment\Database\Workgroup.mdw'", "C:\Database", 1)