InputBox Sizing

  • Thread starter Thread starter Ian D.
  • Start date Start date
I

Ian D.

Is there any way to make the Dialog Box that pops up
for the InputBox function smaller.
I am only promting a user for a number
and the Dialog box is far too wide for my needs.
Can I make it smaller or is there some other way to
prompt my users for a number & then use
that number in my Code.

Thanks
 
To do this, you'll need to make your own Input Box. To do this, create a
form with a text box and the necessary buttons (probably Ok and Cancel) and
size it as desired. Open the form using the acDialog window mode argument in
the DoCmd.OpenForm call. This will make it modal so that the user has to
respond to it before continuing. When you click the Ok button, send the
value they entered to a hidden textbox on the calling form, then close the
pop-up. Your code will wait for the closing of the pop-up then continue. You
can get the value when your code continues from the hidden textbox.
 
Back
Top