General information
Category:
Forms & Form designer
>>Are all objects in a form PRIVATE by nature even if their
>>name is the same as a public object or variable?
>>
>>I know all variables in a program or procedure are
>>private unless they are the same name as a public one.
>>In that case you need to declare the varible as PRIVATE.
>>
>>How do you declare an object in a form as private?
>>can you declare all objects at once in the form as private?
>
>
>To understand the nature of your question, it is necessary to understand what happens when an object is created. The general syntax of an object is;
>
>Public (or Private) NewObjectName
>NewObjectName = CreateObject("ParentClass")
>
>The scope of the object is dependant on whether the object is declared as public or private. I would recommend avoiding public objects that only have function or use within a particular form or method.
>
>Public objects are great for error handling, data access, things like that that will be needed throughout the application.
>
>Just a thought or two on the subject.
>
>Regards,
>
>Jason
What would be the default scope of a form and it's objects contained within?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only