Mike and Doris Manning
mikedorism at ntelos.net
Tue Apr 15 11:06:48 CDT 2003
This should work... Pass in the App you want to open and it does the rest. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com Public Function feOpenIt(sAppPth As String) Dim sAccess As Variant Dim sCmd As String Dim sCmdC As String Dim Retval As Variant Const Q = """" sAccess = SysCmd(acSysCmdAccessDir) & "MSAccess.exe" sCmd = Q & sAccess & Q & " " & Q & sAppPth & Q 'eg. "c:\program files\microsoft office\office\msaccess.exe" "c:\my prog\myFE.mdb" 'sCmdC = Environ("COMSPEC") 'returns (W9X) command.com path or (WNTX) cmd.com path 'if your system requires it, play with the prev & fol line and 'comment out the one following 'retval = Shell(sCmdC & " /c " & sCmd, vbMaximizedFocus) 'uses full command instruction with /c to run one command, delete msaccess from sCmd Retval = Shell(sCmd, vbMaximizedFocus) End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jeff Barrows Sent: Tuesday, April 15, 2003 11:39 AM To: accessd at databaseadvisors.com Subject: [AccessD] Access and VB6 question I need to be able to open an Access 2k front end from a VB6 application. I want the users to click a button on my VB form and have the code open the Access FE in front of the VB app. Then, when we close the Access app, the VB app is already there. Can anyone help me with this? Jeff Barrows Outbak Technologies, LLC jeff at outbaktech.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com