Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening program from access

Status
Not open for further replies.

northernbeaver

Programmer
Jul 9, 2001
164
CA
ok I know about and how to use the shell command, that is not the problem I am having. my client wishes an access based survey to be run everytime users use certain applications on a public computer(Iexplore,MSword,etc) The way I was thinking of figuring out which program was clicked by the user is to replace the shortcuts to word and Internet explorer to call the survey.mdb and pass a variable in the target of the shortcut to access telling access which program was actually desired. I don't know how to tell access how to go and get that variable. how do you access it? any help would be greatly appreciated.

 
Use the /cmd switch of the command line options to pass the program name, possibly even the full program path name.

Then form your code, use the command fnction to get it as a text string. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Is there a place to find out all the command line options that are available. I've searched the help files but to no avail. Does anyone know if there are any known issues with using the shell command on older systems (P166 - Win98 and win95) Thanks for your help.

I had a small program written in VB that pulled the path of the program and lauched the accesss program as well as the program that was passed. the program worked, it launched both but shortly after (20 seconds) the VB program would perform an illegal operation and shut down, under details it would only say a pagefault in module <unknown> has occured.

any advice would be great, I got a client breathing down my neck for this.
 
Ok I see where the command line is and I don't think I can use it. here is the scenario. on the computer there will be two shortcuts. One for internet Explorer. one for MS word. when the shortcut for interne Explorer is pressed I need internet explorer to launch as well as my MS Access Database. the same thing should happen with the second shortcut (except word opens instead of IE). I attempted to put /cmd &quot;Internet&quot; in the target of the short cut but it didnt seem to work. Is there any ideas? I am open to any and all ways of getting this done. thanks

 
The one idea that does come to mind is that both shortcuts launch Access and that in the IE shortcut you pass IE as the /cmd arg to Access and in the word shortcut, you pass word as the /cmd arg, and let Access launch them. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
thanks everyone, with your help its working. Access in calling the programs with no problems at all. But now my client is getting picky (*sheesh*) and after Access launches the program he wants the focus of the program to come back to access. Im thinking of just putting in a timer that waits 15 seconds (allow the program time to fully load) then just me.setfocus. if anyone sees a problem with this, just let me know. Thanks again, you really pulled me out of the flames
 
OK I think Im officially going insane. Something that should be rather simple is turning out to be a nightmare. This is the whole situation. I have a survey created in access. a simple .MDB the client wishes the survey to be automaticly launched everytime a user clicks on the shortcut(s) in the start menu for three programs:Internet Explorer, MS Word, and Corel WordPerfect.

the order should be as follows: when a user clicks on the shortcut, the program should open, a brief pause (2 seconds) and then the survey should pop up over top of the program, leaving the other program maximized so when the survey is closed the program is in view of the user.

this is what I've attempted:

attempt one: VB

I created an EXE written in VB that used the shellexec code to launch the programs in the order I wanted. it was like 6 lines of code. the code would launch the programs and then preform an illegal operation and shut down. under details of the error just said &quot;invalid page fault in module <unknown>&quot;

attempt two: Access

so I decided to dump the whole exe concept and just attempt to use access and the shell command to launch the desired program. I used the /cmd in the shortcut target to launch access, go to my survey.mdb and pass the path of the desired program. upon loading of the first form of the survey I used the shell(command()),vbnormalnofocus to lauch the desired program. it launched the program but the program took focus anyways and left the survey in the background. this is not acceptable to the client.

Attempt three: aceess Launcher program

So I created a second mdb called launcher.mdb this MDB was again passed the path of the desired program via the /cmd command in the target of the shortcut which inturn ran the MDB, used the shell(command()),vbmaximize to launch the desired program then the shell(&quot;c:\survey.mdb&quot;). This mdb would launch the program correctly then stated that it could not find the survey.mdb (the path was verified to be correct).

I am completely out of ideas now. would anybody have any ideas? Please let me know, thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top