Class module reference

kaspi

Registered User.
Local time
Today, 02:16
Joined
Nov 22, 2000
Messages
60
Hi
I would like to use a class module for displaying multiple filter forms.

However I am not sure how to establish reference to the already opened class module in the OnOpen(OnLoad) event of the filer form.

What I have is a Form with products. In this form I open my class module with the "new" keyword, set up properties how I need them etc.

Now I would like to open a filter form from the class module as Dialogue. Well, I just can't figure out how to point the pointer to the already opened class module.

Does anyone tried to do similar thing? Am I conceptually on the right track??

Thanks

Kaspi
 
I'm not sure i understand the question right but here goes....

It sounds like you want a user to choose a filter when the form opens. If so, you can do it any number of ways but here is one:

In the first forms Open event, open another form (in dialog mode) for user input on which filter to use. Then set the first forms filter property to what was chosen on the dialog form and be sure to apply the .FilterOn and .OrderByOn properties to update the first form's filter and display correct data.

hope it helps.
norm
 
Hi Norm

Sorry, I was not clear enough.

I am using a class module as an in-between for my 'main' form and the filter form.
I am storing parameters in the class module to pass it to the filter form and back to the main form.

What I cannot figure out is passing the reference (pointer) of the instance of the class module (instantiated in the main form open event) to the filter form, which opens as a dialogue form.

I got round the problem by storing the reference in a public variable.

Thanks

Jiri
 

Users who are viewing this thread

Back
Top Bottom