Return list box value to subroutine?

J

JP

I have a simple form with a list box,
an "OK" command button and a "Cancel" command button.

This form is opened when a command button on another
form is clicked using "Docmd.OpenForm". It is opened
using the "acDialog" option so that the form is modal.
When the "OK" button is clicked, I want to close the form
and return the value selected in the list box to the
calling subroutine.

Is there a way to return that value without using a
global variable?

I guess what I am really after is a list box equivalent
to the InputBox function.

Thnaks for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top