<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Bericht</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>Kath,
</FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>thanks
for your suggestion. Unfortunately the picklist form is called from several
other forms. </FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>To
make things more complicated, sometimes other things then updating a control on
the calling form have to be done. </FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>In
another application I passed a piece of code in the openargs to the called form
an ran it from the OnClose event via the eval-function. </FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>But
any proc/function called this way has to be public, which is not pretty
either.</FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>So
far, Andy's suggestion sound very appealing to me: </FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>Open
the form from a public function as a dialog (that way the code 'waits' until the
form is closed/hidden). </FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff size=2>The
OK/Cancel buttons on the form hide the form, the function reads the selected
value directly from the listbox on the hidden form, closes it and returns the
selected value.</FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2>Michael</FONT></SPAN></DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=979093109-01082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Ursprüngliche Nachricht-----<BR><B>Von:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>Im Auftrag von </B>Software
Design & Solutions Pty Ltd.<BR><B>Gesendet:</B> Freitag, 1. August 2003
01:56<BR><B>An:</B> Access Developers discussion and problem
solving<BR><B>Betreff:</B> Re: [AccessD] Picklist<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Why not add an after update event
on the called form to update a control on the master form before it is closed?
Then you don't have to hide / unhide forms.</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Kath</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=michael.broesdorf@web.de
href="mailto:michael.broesdorf@web.de">Michael Brosdorf</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=accessd@databaseadvisors.com
href="mailto:accessd@databaseadvisors.com">Access Developers discussion and
problem solving</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 31, 2003 7:38
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [AccessD] Picklist</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2>Dear group,</FONT></SPAN></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff size=2>my
application has a whole bunch of master data tables. I want to create a
single form that allows me to pick one value from these master tables. So
far, I pass OpenArgs to the form specifying from what master data table I
want to pick a value. That works fine. The form basically consist of a
listbox (to display the content of the specified master data table) , a
textfield (to hold the ID of the selected entry), an OK- and a
Cancel-Button. The form is opened as a dialog form (meaning it keeps the
focus until it is closed).</FONT></SPAN></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2>Now comes the problem: how do I get the selected value back to the
calling form? (</FONT></SPAN><SPAN class=843412909-31072003><FONT face=Arial
color=#0000ff size=2>When the user clicks OK, the form is closed. So the
calling form cannot read the value of the listbox or the
textbox.)</FONT></SPAN></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2>Has anyone done something like that and help me
out?</FONT></SPAN></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2>TIA,</FONT></SPAN></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2>Michael</FONT></SPAN></DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=843412909-31072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>