InputBox

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I am using an Input Box and I want to alter its default
appearance. Changes like the size of the box, font,
color, format of input field, and having multiple lines.

Can someone offer some code examples or point to where I
might find them? MS help, MS VBA help and a book I
bought do not shed any light.

Thanks to the MVPs for any help.
Greg
 
Greg,
Sorry Greg, it can't be done.
What you can do is create your own form to do the same thing.
Add as many unbound controls as you wish.
Size 'em and color 'em as fancy as you want.
Code a command button click event on the form:
Me.Visible = False

Then instead of using:
SomeValue = InputBox("Enter the value")
you would write:

DoCmd.OpenForm "FormName", , , , , acDialog
SomeValue1 = forms!FormName!ControlNameOnForm1
SomeValue2 = forms!FormName!ControlNameOnForm2
etc.
DoCmd.Close acForm, "FormName"

When you open the form in Dialog, all processing stops
until you click the command button on the form.
 
Thanks. I'll try that.

-----Original Message-----
Greg,
Sorry Greg, it can't be done.
What you can do is create your own form to do the same thing.
Add as many unbound controls as you wish.
Size 'em and color 'em as fancy as you want.
Code a command button click event on the form:
Me.Visible = False

Then instead of using:
SomeValue = InputBox("Enter the value")
you would write:

DoCmd.OpenForm "FormName", , , , , acDialog
SomeValue1 = forms!FormName!ControlNameOnForm1
SomeValue2 = forms!FormName!ControlNameOnForm2
etc.
DoCmd.Close acForm, "FormName"

When you open the form in Dialog, all processing stops
until you click the command button on the form.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.





.
 
Back
Top