Link to home
Start Free TrialLog in
Avatar of shacho
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
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Where exactly are these DLookups() ?
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
Avatar of shacho
shacho

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

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shacho

ASKER

Just a mysterious bug.