Access: Shell cmd Open MDB

前端 未结 6 1146
野趣味
野趣味 2021-01-21 03:38

I have been using the following command to open another MDB Access file via VBA:

Shell \"cmd /c \" & Chr(34) & strNewFullPath & Chr(34), vbHide
         


        
6条回答
  •  深忆病人
    2021-01-21 04:17

    I use this function when working in Access 2003:

    Public Function RunExternalMDB(MDBName As String, WG As String, UsrNm As String, Pwd As String)
    
            Shell "MsAccess.exe " & """" & MDBName & """" & " /wrkgrp " & """" & WG & """" & " /user " & UsrNm & " /pwd " & Pwd
    
    End Function
    

    This does work in Runtime mode : )

提交回复
热议问题