Passing arguments to an invisible form (1 Viewer)

PaddyIrishMan

Registered User.
Local time
Today, 03:56
Joined
Jun 5, 2002
Messages
166
Hi,
I have an invisible subform on my main form.
The form is made visible based upon options selected in a data tree, i.e. if a certain node is clicked then set the recordsource of the subform & make it visible.

What I want to do is:
When a certain node on the tree is clicked, show the form & have the form goto a new record.

The problem is where to put the code?

I've tried using a public variable (if it's true then docmd.goto newrec) & placed the code in the hidden form's load, open & activate events.

But these events arent triggered because the form is just being made visible.

Anyone have any ideas?

Thanks,
Patrick
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 21:56
Joined
Feb 28, 2001
Messages
27,522
The code has to go where the event is.

If you click in the tree control, then you need an OnClick event.

Then, if the issue is that you want to communicate something to the about-to-become-visible subform, don't do it directly from the tree control. Link the subform to an invisible control that gets fed by your click event. Then before you make the subform visible, try a SubFormNameAsAControl.Requery - or something like that.
 

Users who are viewing this thread

Top Bottom