Solved

Grabbing a value from Access - Please Help

Posted on 2002-04-02
4
116 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Found another answer but this seemed to be the best.  Thanks for all of the help.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now