Is this a form or an actual dialog?
If a dialog you may be able to use the Filedialog (or similar object) if you
are using Access XP or later.
If this is a form, once it is closed, it will lose the value in any
variables. You could store the return value from the modal form in a global
variable, a custom property of the db, or in a variable on your switchboard
form (if you have one that remains open for the whole session of your
application). The next line of your calling code can then pick up the value.
If you want to make this a generic form you can drop into different
databases, I would say you should store the return value as a custom
property of the db. There is sample code in help that shows you how to test
if the custom property has been set up, and if it has not, how to create it
and then populate it. This way you can drop your form and calling code into
any db without having to do any further set up.