[AccessD] Re: Shell /cmd

Admin Sparky dba.email at gmail.com
Wed Jun 29 07:59:39 CDT 2005


Thanks anyway...found it.  This was one of those situations where it
didn't matter how simple the concept was...I had just never seen it or
had a need for it.

"When Microsoft Access is launched from the command line, any portion
of the command line that follows the /cmd option is passed to the
program as the command-line argument. You can use the Command function
to return the argument that has been passed."

Mark


On 6/29/05, Admin Sparky <dba.email at gmail.com> wrote:
> Group,
> 
> Can someone interpret this?  This line of code is behind a button on a
> PowerPoint slide.  As I understand it, the purpose of the button is to
> allow the user to acknowledge that they have read the material.  This
> acknowledgement is tracked by an entry into a database.  What exactly
> is happening here?  They are obviously checking for an Access
> version...but what I'm looking for is a short explanation as to how
> this line of code is shelling out to Access and making an entry into a
> tracking database.  What am I missing?
> 
> Watch for major line wrap.
> 
> Thanks for any enlightenment,
> 
> Mark
> 
> <code>
> Private Sub CommandButton2_Click()
>    If InStr(1, Me.Application.Version, "11", vbTextCompare) Then
>        Shell ("C:\Program Files\Microsoft
> Office\Office11\MSAccess.exe
> ""G:\Quality_Plan\DocuTracker\docutracker.mdb"" /cmd
> ""G:\Quality_Plan\DocuTracker\E15Insight\2-10 (E12 Info).pps""")
>    ElseIf InStr(1, Me.Application.Version, "10", vbTextCompare) Then
>        Shell ("C:\Program Files\Microsoft
> Office\Office10\MSAccess.exe
> ""G:\Quality_Plan\DocuTracker\docutracker.mdb"" /cmd
> ""G:\Quality_Plan\DocuTracker\E15Insight\2-10 (E12 Info).pps""")
>    Else
>        MsgBox "Old Office version. Not Recorded. Contact admin for
> help.", vbCritical + vbOKOnly
>    End If
>    Me.Application.Quit
> End Sub
> </code>
>



More information about the AccessD mailing list