Solved

Multiple Forms

Posted on 1998-07-08
2
142 Views
Last Modified: 2010-05-03
How do I pass a form into a function?
0
Comment
Question by:DanielJenkins
[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
2 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1465211
Forms are really just objects, and can be passed as parameters on your function call.  You can pass them as a form type, or as a type of Object, then your forms methods and properties are available to the function.  Your controls as well can be passed to functions in this manner.  All of these objects have windows handles, and are each uniquely identified by their hWnd (long integer handle).  That's all that really gets passed to the function.  At that point it has a Windows reference back into the object, via the passed handle.

Incidentally, to genralize your code even more, consider passing resultset/recordsets as well.  They work too.
0
 

Author Comment

by:DanielJenkins
ID: 1465212
Thanks for the Help :)
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 93
Problem to With line 4 86
RUNRMTCMD from AS/400 13 129
2 Global Vars, 1 List Box 4 33
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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

738 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