
Adding a Property to a Form?
The properties have to be coded into the child forms, they can not
easily be 'created' while the program is running.
In your child forms add two public variables of the type you need:
[Child form code module]
Option Explicit
Public MyTag1 As String
Public MyTag2 As Varient
Then use them as you would the forms actual Tag property.
Thats the simple method, you can specifically create a method
(Example Form1.Print "Hello world") in a child form where you get
a little more control as to what goes on when the method is called.
From Insert Procedure, choose property. Also look at the Property
Get, Propertry Let, and Property Set examples in Help...
LFS
Quote:
> I would like to add a couple of properties to a form (similar to the
> "Tag" property). Currently, I am dynamically creating child forms in a
> subroutine that has a statement similar to: "Dim NewForm as
> frmTypeName". In this same routine, I would like to create 2 new
> properties for the form being created. I would like these new
> properties to basically be like the ".Tag" property that forms currently
> have to hold info for the form. I have looked at VB's on-line help and
> am lost.
> How can I add new properties to a form that are accessible when I type
> the form name and a "." (ie. Form1.MyNewProperty)? Any help would be
> grealty appreciated.
> Thank you,
> Nelson Lopes