General information
Category:
Coding, syntax & commands
Hi Cetin:
Lot's of stuff you've given me to think about. I've played around with it and have done the following:
In form1, as you suggested, i did the following:
local loEmail,frmEmail
do form form1 name frmEmail
your suggestion to put the code:
loEmail = frmEmail.oEmail
frmemail.release()
created a problem for me. loEmail wasn't available to form1 after i released form2(frmemail). maybe b/c this code is in a command button on form1 so it wasn't available to the form itself?
Therefore, i added it as a property to the form1 (thanks to sergey and borislav for this)
form1.AddProperty("loEmail", frmEmail.oEmail)
frmEmail.release()
an interesting note is that i did it incorrectly at first. I did it as:
thisform.AddProperty("loEmail", frmEmail.oEmail)
after "frmEmail.release()", "thisform.loEmail" didn't show up as an object in the debugger. i'm assuming that "thisform" was still referencing frmemail(form2). as usual, this took me some time to figure out but once i did, i added the absolute reference to form1 and it was fine (however the debugger still didn't list "thisform.loEmail" as an object even later in the program, but "form1.loEmail" was listed as an object with the correct properties).
In the init of frmemail(form2), i added, based on your suggestion:
thisform.AddProperty("oEmail")
this.oEmail = createobject("empty")
it seems to be a bit simpler to run now and works well. i cycle through the properties to see who i am sending emails to and everything went smoothly. i'm glad i disconnected from the internet before sending the emails for testing as my outlook @ home isn't set up to save sent emails in the outbox first - it sends automatically. i would have had a lot of upset clients if i didn't figure this out before testing!
i will probably get some use out of your suggestions in the future. Thanks for your help!
Paul
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only