input box with many selections

  • Thread starter Thread starter bindurajeesh
  • Start date Start date
B

bindurajeesh

I want to create an input box giving the user the option to select an input
text from several names. Is this possible with an input box and if so how.
 
No it is not possible with an input box.

If you want this functionality, you will need to create a form with either a
combobox or a listbox to show the choices. Then open the form in dialog mode
and allow the user to make the selections.

Instead of closing the form, set its visible property to false. This will
allow the processing to continue in the calling code, where you can grab the
user's selection and then you can close the form you have created.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
On Tue, 16 Sep 2008 06:06:00 -0700, bindurajeesh

If with an "input box" you mean the object that is created with the
InputBox function, the answer is No. You would rather want to create
your own form.

-Tom.
Microsoft Access MVP
 
Like they said, you want a form to do this with the form's PopUp property set
to Yes. That way they hae to select a name before proceeding. If you only
want one name selected from the list, use a combo box. If they can select
more than one, use a list box. What I do in these situartions is create the
form, then create a function that opens the form and then returns the value
that was selected by the user (if it's only one name selected). Then when you
want the user to select the name, you simply have a statement like this:

selectedName = GetUserName

or something along those lines. GetUserName would be the function that
displays the form and returns the value selected (agian, if they're selecting
one name). If they're allowed to select more than one name, then you'd want a
function that displays the form and does the processing for handling all the
selected names.
 
Back
Top