I want my data! (Passing info back from a form)

  • Thread starter Thread starter RSGinCA
  • Start date Start date
R

RSGinCA

I'd like to be able to open a form where items would be selected from a list
and then have those chosen items passed to the original form. For instance, it
might be a list of employees. I'd like to make it a generic emploee selection
form so that it could be opened from several different forms, and have the list
of selected employees passed back to the original form.

I haven't been able to figure out how to do this. Any ideas how to do it
without temporarily writing the list to a database table?

Thanks

Rick G
 
RSGinCA said:
I'd like to be able to open a form where items would be selected from
a list and then have those chosen items passed to the original form.
For instance, it might be a list of employees. I'd like to make it a
generic emploee selection form so that it could be opened from
several different forms, and have the list of selected employees
passed back to the original form.

I haven't been able to figure out how to do this. Any ideas how to do
it without temporarily writing the list to a database table?

Thanks

Rick G

You would have to open the selection form in dialog mode. Then use an
"OK" button on the form to make the form invisible, rather than closing
it (Me.Visible = False). The "Cancel" button on the form just closes
the form. The code in the calling form checks to see if the selection
form is still open (though invisible) and, if it is, gets the list of
selected employees from the ItemsSelected collection of the list box on
that form, then closes the form.
 
Ah ha!!!!!! Thank you.
Subject: Re: I want my data! (Passing info back from a form)
From: "Dirk Goldgar" (e-mail address removed)
Date: 2/1/2004 5:41 PM Pacific Standard Time
Message-id: <#[email protected]>



You would have to open the selection form in dialog mode. Then use an
"OK" button on the form to make the form invisible, rather than closing
it (Me.Visible = False). The "Cancel" button on the form just closes
the form. The code in the calling form checks to see if the selection
form is still open (though invisible) and, if it is, gets the list of
selected employees from the ItemsSelected collection of the list box on
that form, then closes the form.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Rick G
 
Back
Top