[AccessD] Picklist

Steve Capistrant scapistrant at symphonyinfo.com
Thu Jul 31 09:13:10 CDT 2003


Michael,

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:

dim glngX as long
dim gstrX as string
dim gbytX as byte
etcetera

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.  And 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.

Steve Capistrant
Symphony Information Services
scapistrant at symphonyinfo.com
Phone: 612-333-1311
www.symphonyinfo.com
212 3rd Ave N, Ste 404
Minneapolis, MN 55401



  --------- Original Message --------
  From: "Michael Brosdorf" <michael.broesdorf at web.de>
  To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
  Subject: [AccessD] Picklist
  Date: 31/07/03 09:42


  Dear group,

  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).

  Now comes the problem: how do I get the selected value back to the calling
form? (When the user clicks OK, the form is closed. So the calling form
cannot read the value of the listbox or the textbox.)

  Has anyone done something like that and help me out?

  TIA,

  Michael







----------------------------------------------------------------------------
--

  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030731/7f1fe85c/attachment-0001.html>


More information about the AccessD mailing list