<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=149420214-31072003>Michael, </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=149420214-31072003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=149420214-31072003>For
the least amount of overhead in terms of keeping forms open and hidden (which
does work), consider using a global variable. You can keep a small
handful of completely generic global variables ready at any point to temporarily
hold a value. In the header of a public standard module, declare several
variables, one for each kind of data type:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=149420214-31072003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=149420214-31072003>dim
glngX as long</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=149420214-31072003>dim
gstrX as string</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=149420214-31072003>dim
gbytX as byte</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=149420214-31072003>etcetera</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=149420214-31072003></SPAN></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff><FONT><SPAN
class=149420214-31072003>They serve as a nice transition area for
holding single variables that need to be "handed off", like the one in your
dialog box. Convenient because they are always available without any new
declarations. </SPAN></FONT>A<SPAN class=149420214-31072003>nd you don't
need to build a big collection: you tend to only use them for the currently
active process, so you can reuse the same "X" over and over. The only
thing you need to remember is that they don't reset automatically; you can't
safely assume that glngX is going to have a default of zero; it
usually contains the value last assigned to
it.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff><SPAN
class=149420214-31072003></SPAN></FONT></FONT></FONT><FONT size=2><FONT
face=Arial><FONT color=#0000ff><SPAN
class=149420214-31072003></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff><SPAN
class=149420214-31072003></SPAN></FONT></FONT>Steve Capistrant<BR>Symphony
Information Services<BR>scapistrant@symphonyinfo.com<BR>Phone:
612-333-1311<BR>www.symphonyinfo.com<BR>212 3rd Ave N, Ste 404<BR>Minneapolis,
MN 55401<BR></DIV></FONT><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">--------- Original Message --------<BR>From:
"Michael Brosdorf" <michael.broesdorf@web.de><BR>To: "Access Developers
discussion and problem solving"
<accessd@databaseadvisors.com><BR>Subject: [AccessD] Picklist<BR>Date:
31/07/03 09:42<BR><BR>
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<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><BR><BR>
<HR>
<BR><FONT face="Courier New"
size=2>_______________________________________________<BR>AccessD mailing
list<BR><A class=autolink
href="mailto:AccessD@databaseadvisors.com">AccessD@databaseadvisors.com</A><BR><A
class=autolink href="http://databaseadvisors.com/mailman/listinfo/accessd"
target=_blank>http://databaseadvisors.com/mailman/listinfo/accessd</A><BR>Website:
<A class=autolink href="http://www.databaseadvisors.com/"
target=_blank>http://www.databaseadvisors.com</A><BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>