Solved

Grabbing a value from Access - Please Help

Posted on 2002-04-02
4
117 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now