On Load Event Double Launching

hi there

Registered User.
Local time
Today, 10:22
Joined
Sep 5, 2002
Messages
171
hi all,

i have a main navigation menu that uses a tree structure to launch various objects in my application. i populate the tree structure using the OnLoad event. nodes are hard coded. since i only use the tree structure for navigation to various database objects i do not use recordsets to populate my nodes.

so my tree structure loads perfectly and works during beta testing. upon finalizing the application for distribution, when i uncheck the option to display the database window in the startup options i get an error indicating that i have duplicate key values on the tree structure when trying to exit the application (i.e. clicking on the command button). i use a macro to exit the application (e.g. quit). the macro is linked to the OnClick event of a command button.

i've traced this error to the following problem. apparently, upon clicking the command button (that launches the macro), the form OnLoad event is launching again which creates new key values for the tree structure. since these key values have already been created, this results in duplicate keys. this only happens when i omit (i.e. uncheck the option) the database window upon startup.

has anyone had any experience with the form OnLoad event launching twice when omitting the database window from startup? i've never run into this before and i use tree structures in almost all of my applications.

thanks.
 
Never encountered that, but you didn't post any code. Macros are not the way to go here, but without seeing what that Macro does, there's no way to provide help beyond random guesses. And your name isn't Howie Mandel.
 

Users who are viewing this thread

Back
Top Bottom