473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

A97 InputBox controls - how to limit?

MLH
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?
Jan 19 '06 #1
2 1803
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
Jan 19 '06 #2
MLH
Pretty good strategy.
Jan 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: news.microsoft.com | last post by:
hey all, I am having an odd problem with the InputBox in VB.NET, and it ONLY happens on one of my computers. When I try "Dim x as String = InputBox("TESTPROMPT"), I get the following error: ...
0
by: chris | last post by:
I am nearing completion of writing a VB6 application. My main form is organized using a SSTab control, so you can imagine there are lots of controls on top of that. Much to my dismay I encountered...
4
by: ARobi | last post by:
I am getting the message that no more controls can be added to the form. The message also says that if I deleted controls from this form in the past (which I did), than I may be able to rename the...
2
by: missimaths | last post by:
I was wondering if anyone knew of a way to control the text a user types into an inputbox? I want the user to type in four letters only. I can check the lenght by using the len() function in vba...
5
by: André Almeida Maldonado | last post by:
Hy Guys, I need to use in my aspx page an InputBox. How can I do it (I prefer don't using JavaScript) Thank's...
1
by: | last post by:
When trying to use the InputBox function I get the error "InputBox is a namespace and therefore is not a valid expression". Can anyone tell me what the problem is? Thanks.
7
by: portroe | last post by:
How can you populate an array using an inputbox(es)? thanks portroe
0
by: JohnyStyles | last post by:
I have a templated user control which looks like this: ----------------------------------------------------------------- <uc:MyUserControl runat=server> <TemplateProperty> </TemplateProperty>...
8
by: jpoquette | last post by:
I have recently upgraded a Visual Basic 2003 win forms application to 2005. After doing so I can no longer get my project to compile. The code is bombing on any line that uses an InputBox. I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.