Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Pop Open Ms Access Using Script Or Batch File

Discussion in 'Information Technology' started by gregor suttie, Jul 28, 2006.

  1. gregor suttie

    gregor suttie
    Expand Collapse

  2. Loading...

    Similar Threads Forum Date
    Sikhs Declining As A Percentage Of India's Population Hard Talk Apr 18, 2016
    Christianity How Pope Francis Made Me Better Appreciate My Sikh Faith (COMMENTARY) Interfaith Dialogues Sep 27, 2015
    Declining Sikh Population Percentage In Punjab Sikh Sikhi Sikhism Aug 26, 2015
    Christianity Pope Francis Dines In The Vatican Cafeteria, Denounces The Mafia In Naples Interfaith Dialogues Jul 27, 2014
    Christianity Pope Francis Admits Reveals Bible Metaphors - In Agreement With Sikhi! Interfaith Dialogues Jan 3, 2014

  3. OP
    Douglas J. Steele

    Douglas J. Steele
    Expand Collapse

    See that big white space underneath the subject? That's where you're
    supposed to put details of what you're looking for, not strictly write a
    cryptic subject!

    Doug Steele, Microsoft Access MVP
    (no private e-mails, please)

    "gregor suttie" <gregor suttie@discussions.microsoft.com> wrote in message
  4. OP
    Albert D.Kallal

    Albert D.Kallal
    Expand Collapse

    Ok...I'll bite...despite a big white empty area!!!

    If you just need to start ms-access, or a given "file" of you choice, then a
    batch file is fine

    start "c:\data\myWordDoc.Doc"


    start "c:\data\mydata.mdb"

    The above command at the windows prompt will thus launch the file of your
    choice as if you had clicked on it....

    However, if you need more control, or want to run a particular piece of
    code, and then shutdown ms-access, then likely a windows script would be a
    more appropriate.


    dim accessApp

    msgbox "Click ok to run batch job",64

    set accessApp = createObject("Access.Application")

    accessApp.OpenCurrentDataBase("C:\Documents and Settings\Albert\My

    accessApp.Run "TimeUpDate"


    set accessApp = nothing

    msgbox "Job complete", 64

    The above would launch ms-access, and then run/execute a pub sub called
    TimeUpDate in a standard module. The application is then quit.

    So, a windows script is somewhat more flexibility, as you don't have to
    'quit' the application in code after you run a routine of your choice....

    If you just need to launch a particular .doc, pdf, or in your case mdb
    file...use the "start" command at the windows prompt, or a .bat file. If you
    need the 2nd case where you want to run some code inside of the mdb..and
    then quit...use the 2nd windows script example. It is not clear which
    scenario you need...but, then again, that comes back to you not using the
    big white space to further give details about what you need...(so, I was
    either forced to skip your question, or write a *longer* post guessing as to
    what/which scenario you are looking for).

    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada
Since you're here... we have a small favor to ask...     Become a Supporter      ::     Make a Contribution     

Share This Page