Solved

Multiple Forms

Posted on 1998-07-08
2
143 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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.
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…
Suggested Courses
Course of the Month9 days, 22 hours left to enroll

623 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