i am using Access2000. Currently i had a main form call "frmDownload" and sub form "fsubAdmmission". Under the fsubAdmmission, i do have another sub form "fsubHospital". Once i link my application to database A, when "frmDownload" loaded, it does successfully create "fsubAdmmission" object and i am able to assign "fsubAdmmission.form.recordsource".
Once i link my application to database B, when "frmDownload" loaded, it failed to assign the recordsource to "fsubAdmmission" due to the "object does not exist or closed". I do debug the application with both of the database. Once execute on docmd openform "frmDownload", , ,"" , i found tat at the first line "frmDownload" loaded (form_load) function, i can access the "fsubAdmission.form.recordsource" at immediate window (for database A).
when i link my application to database B, once execute on docmd openform "frmDownload", , ,"" at the first line of form_load function of frmDownload, when i want to access to the "fsubAdmission.form.recordsource" at immediate window, it does hit error ("object was not created or closed").
i have no idea on wat problem is this..since it does not execute any my own code on the first line of form_load function. i feel that one of the problem is because the subform didnt loaded once the mainform was loaded. Is there any method i can debug into docmd.openform command ? Or anyone know what exactly the problem was? i will appreciate if anyone can give me some suggestion. Thank