Solved

Change Enter Parameter dialog box title in MS Access 2010?

Posted on 2011-09-09
15
591 Views
Last Modified: 2012-05-12
Hi - Is there a way to change the default Enter Parameter dialog box title in MS Access 2010? Not the text that appears on the box like "Enter your name" or something but the actual title of the box ... like you can change a msgbox title in a VB, C app,  etc.

Thanks!

0
Comment
Question by:rinkydink
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 3
  • +1
15 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 36510604
No.

If you don't want to see it then build a form for users to enter the required values and use the form reference instead of the parameter field.
0
 
LVL 26

Expert Comment

by:Nick67
ID: 36511795
Ditto what @peter57r said.
But...
Queries can take functions as parameters so...

Function FakePrompt()
FakePrompt = CLng(InputBox("hey", "you", "1"))
'where I used this was in a Long field
'inputboxes return strings--so coerce yours as applicable
'I needed to coerce to long, hence Clng() wrapping the inputbox
End Function


Then instead of the [Enter your parameter]
put
=FakePrompt()

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36511936
Yes, why force your users to type in anything...?

Suppose a user spells the name wrong...?

Use the standard technique of building a form with a combobox where the user can easily "select"  a name from a combobox.

Then your Query criteria would be something like this instead:

    WHERE SomeName=Forms!YourForm!YourCombobox

There are half a dozen other ways to do things like this, as well.

Just an FYI
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 26

Expert Comment

by:Nick67
ID: 36512041
Don't get me wrong.
A a parameter form is a very happy thing
but...
<Is there a way to change the default Enter Parameter dialog box title>
NO.
Can you use a ligtweight function to substitute an InputBox (which you can change the title for)
YES.
Would I do that?
I can't picture a scenario for me where it makes sense--but it can be done.
0
 
LVL 1

Author Comment

by:rinkydink
ID: 36512972
Not being a db genius by any means......I need to write the function in vba and then call the query?

Does the query need to be written in vba as well versus a saved query?

Thanks!
0
 
LVL 26

Accepted Solution

by:
Nick67 earned 500 total points
ID: 36513086
No, no!

You build the function in a VBA code Module

Function FakePrompt()
FakePrompt = CLng(InputBox("hey", "you", "1"))
'where I used this was in a Long field
'inputboxes return strings--so coerce yours as applicable
'I needed to coerce to long, hence Clng() wrapping the inputbox
End Function


and then you create a query thart uses = FakePrompt() as a criteria
Attached is a sample
FakePrompt.mdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36514739
rinkydink,

You don't think making a standard form with a combobox (the standard way this is done) is even worth investigating?

I applaud Nick for his stellar code, but even he advised against this originally.

We have all harkend back to Pete's original post, ...which you never replied to...

And again, ...using a form with a combobox is the standard way of doing this...

Jeff
0
 
LVL 26

Expert Comment

by:Nick67
ID: 36515205
And I do concur with both @peter57r and @boag2000 that creating or using a form and using a reference of =Forms!SomeForm!SomeControl is a better way to pass a parameter to a query.
But I always hesitate to say something is impossible.
And it is handy to know how to create a public function to pass a value that you couldn't otherwise use as a query parameter, like a global variable for example.

What I provided was a curiosity, not a production solution.
It would work, but it really isn't how a polished app would implement your requirements
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36516560
Nick,

Well said...

... and in all fairness, I think whatever solution you post should be noted and/or accepted.

Sometime the thought process involved in doing things in a different way is the most important thing.

There are always different ways to do the same thing.


And we all know, that in most cases there is no clear-cut Right or Wrong solution.

In addition, we all must acknowledge (myself especially) that there are situations where "The Standard approach" is simply not applicable, or not a viable option (for whatever reason), in these cases, an alternate approach is needed.

Finally, ...Who am I to say what the solution should be?
LOL

My goal was just to remind the OP of the original suggestion by Pete.

So as long as both approaches are noted, the ultimate solution is up to the OP.

Jeff

0
 
LVL 1

Author Comment

by:rinkydink
ID: 36529129
Thanks guys!

I have used a form to pass a parameter via a control before and so I agree it is the most common and most practical way to do this normally, in this case, I had to dump an Excel file with hundreds of names into a temporary table so I could run a quick query on them to return their manager's name when needed and it is mostly only used by me then it will be deleted so the function option works better for me in this case versus adding hundreds of names to a combo box.

I was not aware of how to pass a function as a parameter so I learned something new and I appreciate that.
0
 
LVL 26

Expert Comment

by:Nick67
ID: 36530403
Good!

I am glad that it was useful and you learned something new.
There are some things the query editor just doesn't like.
It's handy to know that, if you can write them up as a function, that you can use anything in the query editor.
0
 
LVL 26

Expert Comment

by:Nick67
ID: 36530426
As a personal side note, thanks for the points.
They were the points that moved me in rank from Guru to Wizard in MS Access!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36530608
Well then a congratulation is in order!

Well Done!

;-)

Jeff
0
 
LVL 26

Expert Comment

by:Nick67
ID: 36530753
Thanks man!
0
 
LVL 1

Author Comment

by:rinkydink
ID: 36533404
No prob, thanks for the solution and congrats on the new rank!

0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question