?
Solved

Grabbing a value from Access - Please Help

Posted on 2002-04-02
4
Medium Priority
?
122 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 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…
Suggested Courses

752 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