shacho
asked on
Event AFTER Domain Functions Have Resolved
I've added some DLookups to a form and they're wreaking havoc on some of my objects in memory (collections being destroyed, etc.) that are created On_Load. If I initialize all these objects AFTER the DLookups have resolved there should be no problem. I've tested this by running the code with a button after I see the DLookup values populated. Is there a form event that fires when all these functions have resolved? OnLoad and OnCurrent run before they have resolved.
Mike
Mike
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>Where exactly are these DLookups() ?
As Control Sources on unbound textboxes.
>DLookups() within themselves are not going to do anything to any other code.
You're right - they shouldn't. But something goes haywire when they resolve. You may recall I was working on storing references to textboxes in a collection in order to monitor double-click events. As soon at I put these DLookups on my form, the collection vanishes from memory after one double-click event is trapped. Poof - it suddenly equals "Nothing". If I remove the DLookups, everything works fine. The DLookups themselves also resolve just fine. I've already worked around it by running the DLookups once on Load in the code and setting the textbox values directly, i.e. there are no "live" DLookups on the form. Now things are fine again. Would love to know why, though.
Mike
As Control Sources on unbound textboxes.
>DLookups() within themselves are not going to do anything to any other code.
You're right - they shouldn't. But something goes haywire when they resolve. You may recall I was working on storing references to textboxes in a collection in order to monitor double-click events. As soon at I put these DLookups on my form, the collection vanishes from memory after one double-click event is trapped. Poof - it suddenly equals "Nothing". If I remove the DLookups, everything works fine. The DLookups themselves also resolve just fine. I've already worked around it by running the DLookups once on Load in the code and setting the textbox values directly, i.e. there are no "live" DLookups on the form. Now things are fine again. Would love to know why, though.
Mike
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"I'm sure you can relate."
Yes.
Yes.
ASKER
Just a mysterious bug.
What event occurs after they run depends on where they are executing.
DLookups() within themselves are not going to do anything to any other code.
mx