Solved

Grabbing a value from Access - Please Help

Posted on 2002-04-02
4
119 Views
Last Modified: 2010-05-02
Is it possible to be using an Access Form and then have it open up a VB program that can get a value from the Access Form?  If so how do you do this?

Thanks,

M!
0
Comment
Question by:ho0mwp
4 Comments
 
LVL 4

Expert Comment

by:Glowman
ID: 6913023
Well off the top of my head you could have the Access form call the VB app with a command line paramater attached that contained the value you wanted to pass.  Then have the VB app deal with that value in whatever way you want.  
0
 
LVL 6

Expert Comment

by:VK
ID: 6913054
Hello ho0mwp !

There are a lot of approaches since that are all Microsoft products:

1. API SendMessage Call
2. OLE
3. DDE
4. ActiveX

V.K.
0
 
LVL 4

Accepted Solution

by:
trkcorp earned 50 total points
ID: 6913164
Glowman has the simplest solution, but if you don't already know: (it took me forever to find this, searching help for parameter, argument, passing parameters, etc... and never getting the answer :( ) Anyhow, when you want to pass parameter(s) you just call like always:
MY_PGM.exe
But you add a parameter:
MY_PGM.exe /Install
Your target program should start with a Sub Main in a module instead of a form, as you probably know already know you specify this in the VB project properties on the general tab, it is called "Startup Object"
Then in your Sub Main:
Public Sub Main()
Dim sParm As String
   If Len(Command) <> 0 Then  'You have parameter(s)!
       If InStr(1, Command, "/Install", 1) > 0 Then
         Call Process_Parm(Command)
       Else
          'Etceteras...  Or use a select case or whatever
       End If
   End If
End Sub
0
 

Author Comment

by:ho0mwp
ID: 6939999
Found another answer but this seemed to be the best.  Thanks for all of the help.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question