FredixBlog


Just my log about anything I could find enjoyable.



Command line parameter

author Posted by: fredometro on date Jan 6th, 2004 | filed Filed under: MS-Access

Quertion: Hi
I am trying to pass a simple command line parameter to my Access Application. In my Shortcut I have written this:
“M:\\MyApp.MDB” /Cmd “Success!”
and in the actual application the first line of code displays what’s in the command line. ie:
msgbox Command(),vbInformation
———————————
All I am getting are blank lines.
Any Suggestions,
Many thanks
Ted

Hi!

There is a very simple explanation:
Your command is:

“M:\\MyApp.MDB” /Cmd “Success!”

So you call MyApp.mdb, which is associated with Access, so, as expected, access launches the MDB as expected, but in the file association process, it looses all the rest, thus your blank line.

The easiest is to enter the command like this:

“c:\\program files\\microsoft office\\office\\msaccess.exe” /cmd Success!

Or whereever you have msaccess.exe installed.

There is another solution, which implies messing the registry. Just post a follow up and I can start trying: I LOVE messing the registry.

Regards.

Fredix gave this follow-up answer on 1/25/2002:
Hi! Me again!

I couldn’t resist to try the registry trick.

1) Click start/run, type regedit, click ok

2) If you are not familiar with the registry or abused with the bourbon, just concentrate and make no mistake. There is no Undo command. :-)

3) Open the HKEY_CLASSES_ROOT key and browse down until you find the .mdb key. Open it.

4) Depending on your version of Access, you have: Access.Application.9 for Access 2000 or Access.Application.8 for Access 97.

5) The previous step was only for your culture. There is nothing to do here, just check its here.

6) In Edit menu, click find. Enter Access.Application.8 (97) or Access.Application.9 (2000). Click Find Next

7) Open this found key and look for a key named ‘Command’. Its under Access.Application.8\shell\open\

8) On the right part of the screen, click on the red icon. The value looks like this

I:\\Program Files\\Microsoft Office 97\\Office\\MSACCESS.EXE /NOSTARTUP “%1″

9) Note that my theory is correct: There is only one parameter taken here. You should add two more: One for the /cmd, and one for the “success!”

10) Change the value so that it is:

I:\\Program Files\\Microsoft Office 97\\Office\\MSACCESS.EXE /NOSTARTUP “%1″ %2 %3

Note there is no ” with the %2 and the %3

11) Close your editing box and try your command: “M:\\MyApp.MDB” /Cmd “Success!”

12) Guess what is displayed in your message box?

You can do the same with Access.Application.9 if you have Access 2000.

I hope this makes sense to you.

Regards.

tag56 Responses to “Command line parameter”

  1. avapSoome Said,

    now I’ll stay tuned..

  2. Kelly Brown Said,

    The article is ver good. Write please more

  3. zommemiGuatte Said,

    Thank you for article. It is very good read.
    I love to read http://www.fredometro.com!

    dallas teeth whitening

  4. Chicas Hot Xxx Said,

    I should email you about it.

  5. CrisBetewsky Said,

    Some of us even don’t realize the importance of this information. What a pity.

  6. londonsslovejob Said,

    How to Choose a Faxing Product
    How to Decide Whether to Buy a Franchise
    How to Communicate in a Business Crisis

    How to Insure a Home-Based Business
    1. Determine what additional insurance coverage you will need to insure your home-based business.

    2. Check out insurance programs available through self-employment organisations or the local Chamber of Commerce.

    3. Contact the insurance company that provides your home owner’s or rental policy insurance to determine the riders and additions you need to insure your home-office property.

    4. Investigate business interruption insurance, which reimburses you if you are suddenly unable to conduct your business.

    5. Conduct a daily backup of computer data and transfer information to a safe place.

    All it and is much another you can find out on a site
    http://napkins.v3host.be

  7. Videosde Sexo Gratis Said,

    well.. it’s like I knew!

  8. Dryer Vent Cleaning Said,

    Excellent site, keep up the good work

  9. Bill Bartmann Said,

    Cool site, love the info. I do a lot of research online on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks,

    A definite great read.. :)

    -Bill-Bartmann

  10. Sparirrepow Said,

    I don’t know If I said it already but …Cool site, love the info. I do a lot of research online on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks, :)

    A definite great read..

    -Bill-Bartmann

  11. Kelli Garner Said,

    Great site, how do I subscribe?

  12. Chonfidindy Said,

    Hello,

    visits my coooool website - crimenetwork.biz.
    killu.crimenetwork.biz
    http://crimenetwork.biz
    very coooool!

    yo yo, my name is killu, and i have no skills. my server i let manage by 2×4, but i tell everybody that i am pro.
    my server is maximum ddos protected!!!!

    you do not must abuse my hoster & domainregistrar, both are bulletprooooooooof man.
    visit my site or go DIE, motherfucke

    k!llu - gangsternetwork - your master - bigest botnet

  13. annajoicles Said,

    Salut,

    mon nom est : Anna, J’ai 24 ans bientot
    Je vais bientot presenter mes activites sur un petit blog de france television
    http://blog.france2.fr/musculation-appartement/ sur la musculation a pratiquer chez soi
    peut etre pourrons nous echanger sur le sujet ?

    A+

  14. Free 3gp Hentai Said,

    eh.. bookmarked thoughts :)

  15. AnnaMendovea Said,

    Hello,

    I’m Anna, I’m thirty two old, I work in a french rest house. it’s great to come with you and I’d like to talk in english

    cheers,

    Ann :: [url=http://jobfairincalifornia.com/annajoicles/2009/11/23/maison-de-retraite/]maison de retraite[/url]

  16. AnnaMendovea Said,

    Hi,

    I’m Ann, I’m 38 old, I work in a french rest house. it’s great to share with you and I’d want to improve my english

    cheers,

    Ann :: [url=http://annajoicles.pinoycube.com/2009/11/23/maison-de-retraite/]maison de retraite[/url]

  17. AnnaCorrinna Said,

    Hello,

    I’m Anna, I’m thirty three old, I work in a medicalised french rest house. it’s great to come with you and I’d like to wite in english

    regards,

    Ann :: [url=http://blogfriends.com/maisonderetraite/2009/11/30/maison-de-retraite-mdicalise/]maison de retraite[/url]

  18. fenabelp Said,

    any updates coming ?

  19. AnnaCorrinna Said,

    Yo,

    I’m Ann, I’m 32 old,
    I work in a medicalised french rest house. it’s nice to share
    with you and I’d would like to talk in english

    regards,

    Anna :: [url=http://www.retraiteplus.fr]maison de retraite[/url]

  20. NathanThomas Said,

    Hi,

    I now got a quick internet access, it’s great to share with you

    regards,

    Nathan from [url=http://israel.storeblogs.com/]israel[/url]

  21. SpikeSeb Said,

    Hello,

    I am Spike, soon 35 years ,
    I teach plastic art at college

    see you,

    Seb from [url=http://www.spikeseduction.com]seduction[/url]

  22. SpikeSeb Said,

    Yo,

    I am Sebastien, soon 43 ,
    I teach plastic art at college

    bye,

    Seb from [url=http://www.spikeseduction.com]seduction[/url]

  23. SpikeSeb Said,

    Hello,

    I am Seb, soon 38 ,
    I teach plastic art at college

    see you,

    Spike from [url=http://www.spikeseduction.com]seduction[/url]

  24. infalry Said,

    Please can anyone tell me how to start trading Forex, and if it’s possible to stsrt with a little amount. Would also like to know about trading from my home (I live in Africa). Will be glad to receive any answer.
    [url=http://forexrobot-review.info]best forex software[/url]

  25. infalry Said,

    I am looking at purchasing a robot but want to know how to sort the rubbish out from the good. I am currently looking at forex megadroid, Poison robot, Pips Leader. Any suggestions, has anyone tried these robots with success.
    [url=http://forexrobot-review.info]best forex software[/url]

  26. MarkTCollins Said,

    Hi,

    I am Mark, soon 41 , I teach sports in high school

    bye bye,

    Mark, my little blog [url=http://www.2rouesfrance.com]moto[/url]

  27. MarkTCollins Said,

    Hello,

    I am Mark, soon 43 years , I teach sports in high school

    bye bye,

    Mark, my little blog [url=http://www.2rouesfrance.com]moto[/url]

  28. MarkTCollins Said,

    Hi,

    I am Mark, soon 39 years old, I teach sports in high school

    bye,

    Mark, my little blog [url=http://www.2rouesfrance.com]moto[/url]

  29. MarkTCollins Said,

    Hi,

    I am Mark, soon 36 old, I teach sports in high school

    regards,

    Mark, my little blog [url=http://www.2rouesfrance.com]moto[/url]

  30. Power Home Solar Review Said,

    Great site, I will be back. Well done

  31. pokemon hentai Said,

    pokemon hentai…

    I’m agree with you but imho you should think about that problem… Free porn hairy gallery[ ?????]…

  32. naruto shippuden hentai Said,

    naruto shippuden hentai…

    orges famale masterbation famale bare feet thumb pics fam?? llysex fam?? l??…

  33. NARUTO HENTAI VIDEOS Said,

    NARUTO HENTAI VIDEOS…

    St Charles, Asian porn , Asian porn, trnb, Easter clipart , Easter clipart, 032, Stars , Stars, 358, Science fair projects , Science fair projects, xnvysc, The hun , The hun, %(((, Verzi za abraham , Verzi za abraham, O, Where can i see eurythmics vide…

     Add A Comment

You must be logged in to post a comment.