Charlotte Foust
cfoust at infostatsystems.com
Tue Jul 1 10:03:39 CDT 2003
You could also try the OpenCurrentDatabase method, which doesn't require
so much code..
Charlotte Foust
-----Original Message-----
From: Stephen Bond [mailto:stephen at bondsoftware.co.nz]
Sent: Monday, June 30, 2003 7:54 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Invoking one Access app from another
Think I've got it solved (it's still daytime in the Antipodes <g>).
This code attached to a command button does the trick ...
Now I should probably put in some error checking (If Dir$(filename)=""
....) etc
Dim strAppName As String, strWorkgroupFilename As String
Dim CommandLine As String, strDBFullname As String
Dim strDBDir
strAppName = SysCmd(acSysCmdAccessDir) & "MSACCESS.EXE"
strWorkgroupFilename = SysCmd(acSysCmdGetWorkgroupFile)
strDBDir = GetDBDir() ' an internal function which returns the dir
of the present FE MDB
strDBFullname = strDBDir & "FE2prog.MDB"
CommandLine = SymbolDoubleQuote & _
strAppName & SymbolDoubleQuote & _
" /wrkgrp " & SymbolDoubleQuote & _
strWorkgroupFilename & SymbolDoubleQuote & _
" " & SymbolDoubleQuote & strDBFullname & _
SymbolDoubleQuote
If CurrentUser() = "stephen" Then Debug.Print CommandLine
Call Shell(CommandLine, vbMaximizedFocus)
Cheers
SB
-----Original Message-----
From: Stephen Bond
Sent: Tuesday, 1 July 2003 3:02 p.m.
To: accessd at databaseadvisors.com
Subject: [AccessD] Invoking one Access app from another
I have two Access apps that have some shared tables.
I have looked at completely incorporating #2 into #1, but the combined
front end would be unwieldy and user-unfriendly if I did that, and the
BE would be bigger than I want it to manageably be.
So, I want to be able to have a command button on the
master menu of FE#1 which would invoke FE#2.
I'm sure this is simple - could someone start me off please.
TIA
Stephen Bond
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com