On Thu, 19 Jan 2006 01:27:41 -0500, MLH <CR**@NorthState.net> wrote:
HowManyMore = InputBox(MyString, "How Many More?", "3")
The above line results in an InputBox displaying that has an X
button in the upper right corner. And next to it, there's a ? button
(for help, I suppose). In addition to the question posed by MyString,
there are 2 more buttons: an OK button and a Cancel button. I
would like to have NOTHING but the OK button. Can I do that
with InputBox in A97?
The default buttons can not be changed in the A97 input box.
I always create a form to replace the input box and open it in dialog mode.
When a form is open in dialog mode code execution in the calling routine is suspended until the dialog form is either
closed or it's visible property is set to false.
The basics steps are to create the form with whatever buttons etc you desire.
The code behind your OK button should set the visible property to false but NOT close the form.
Open the form from your calling routine in dialog mode.
DoCmd.OpenForm "frmMyInputForm",,,,,acDialog
Code execution is suspended here.
The user enters the amount and clicks the OK Button.
Me.Visible = False
Code execution resumes here, so get the value from the hidden form.
intHowMany = Forms!frmMyInputForm!HowMany
Now close the input form.
DoCmd.Close acForm, "frmMyInputForm"
Do whatever.
Wayne Gillespie
Gosford NSW Australia