<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [AccessD] How do I determine which form called?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Thank you for your suggestion. I think I need to explain a bit further. I have a form "frmSelect" that utilizes a special class "DblListbox". Since the two are almost always associated I have have code in the "init" method to default to frmSelect as follows:</FONT></P>
<P><FONT SIZE=2>If fm Is Nothing Then Set Me.Callingform = Forms!frmselect</FONT>
</P>
<P><FONT SIZE=2>where the callingform property passes the form object (I have not included the error checking code):</FONT>
<BR><FONT SIZE=2>Public Property Set Callingform(frm As Form)</FONT>
<BR><FONT SIZE=2> Set fm = frm</FONT>
<BR><FONT SIZE=2>end property</FONT>
</P>
<P><FONT SIZE=2>In the open property of frmselect I have:</FONT>
<BR><FONT SIZE=2>Set lb = New DblListbox</FONT>
<BR><FONT SIZE=2>Set lb.Callingform = Me</FONT>
<BR><FONT SIZE=2>lb.Init strRecordname</FONT>
</P>
<P><FONT SIZE=2>All this works fine. However it occurs to me that if dbllistbox were smart enough to determine which form called it I could eliminate the callingform property. That is why I was wondering if there exists some way to determine and pass automatically to the dbllistbox class the form object which called it. Thanks,</FONT></P>
<P><FONT SIZE=2>Jim Hale </FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Jim DeMarco [<A HREF="mailto:Jdemarco@hshhp.org">mailto:Jdemarco@hshhp.org</A>]</FONT>
<BR><FONT SIZE=2>Sent: Monday, June 30, 2003 10:10 AM</FONT>
<BR><FONT SIZE=2>To: Access Developers discussion and problem solving</FONT>
<BR><FONT SIZE=2>Subject: RE: [AccessD] How do I determine which form called?</FONT>
</P>
<BR>
<P><FONT SIZE=2>One way is to pass it using the docmd.openform's OpenArgs parameter.</FONT>
</P>
<P><FONT SIZE=2>HTH, </FONT>
</P>
<P><FONT SIZE=2>Jim DeMarco </FONT>
<BR><FONT SIZE=2>Director of Product Development </FONT>
<BR><FONT SIZE=2>HealthSource/Hudson Health Plan </FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Hale, Jim [<A HREF="mailto:jim.hale@fleetpride.com">mailto:jim.hale@fleetpride.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Monday, June 30, 2003 10:04 AM</FONT>
<BR><FONT SIZE=2>To: 'Access DatabaseAdvisors (E-Mail)'</FONT>
<BR><FONT SIZE=2>Subject: [AccessD] How do I determine which form called?</FONT>
</P>
<BR>
<P><FONT SIZE=2>Does anyone have a function that will allow a class to determine which form called it? TIA </FONT>
<BR><FONT SIZE=2>Jim Hale </FONT>
</P>
<BR>
<P><FONT SIZE=2>***********************************************************************************</FONT>
<BR><FONT SIZE=2>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".</FONT></P>
<P><FONT SIZE=2>***********************************************************************************</FONT>
</P>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>AccessD mailing list</FONT>
<BR><FONT SIZE=2>AccessD@databaseadvisors.com</FONT>
<BR><FONT SIZE=2><A HREF="http://databaseadvisors.com/mailman/listinfo/accessd" TARGET="_blank">http://databaseadvisors.com/mailman/listinfo/accessd</A></FONT>
<BR><FONT SIZE=2>Website: <A HREF="http://www.databaseadvisors.com" TARGET="_blank">http://www.databaseadvisors.com</A></FONT>
</P>
</BODY>
</HTML>