Solved

Grabbing a value from Access - Please Help

Posted on 2002-04-02
4
120 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reading the Contents of a Directory In Access VBA 5 89
Determine Range to Select 5 58
Run code from text file in vb 1 87
IF ELSE Statement in Excel Macro VBA 16 87
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

730 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