ACC: Starting Another Application from a Text Box on a FormID: Q109705
|
Novice: Requires knowledge of the user interface on single-user computers.
This article describes how you can start another application from a text
box on a Microsoft Access form.
NOTE: This article explains a technique demonstrated in the sample
files, FrmSampl.exe (for Microsoft Access for Windows 95 version 7.0)
and FrmSmp97.exe (for Microsoft Access 97). For information about how
to obtain these sample files, please see the following articles in the
Microsoft Knowledge Base:
Q150895 ACC95: Microsoft Access Sample Forms Available on MSL
Q175066 ACC97: Microsoft Access 97 Sample Forms Available on MSL
You can start another application from a text box on a form by attaching
a RunApp action to the text box's AfterUpdate property. The example below
demonstrates how to start an application and load the file whose file name
was typed in the text box. This example will start the Microsoft Word for
Windows application and load the file from the Word for Windows
folder:
RunApp
-------------------------------------------------------
Command Line: ="c:\winword\winword.exe c:\winword\" & _
Forms![formname]![controlname] & ".doc"
RunApp
-------------------------------------------------------------
Command Line: ="c:\msoffice\winword\winword.exe " & Chr(34) & _
"c:\my documents\mydoc" & ".doc" & Chr(34)
For more information about "RunApp action", search the Help Index for "RunApp," or ask the Microsoft Access 97 Office Assistant.
Keywords : FmsEvnt
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 30, 1999