Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Format input box for query prompt

Posted on 2013-01-14
4
Medium Priority
?
1,179 Views
Last Modified: 2013-01-14
We're using Access 2010.

In VBA you can code a message's input box like the following...
   MsgBox "You must enter the address first.", vbInformation, "Instructions..."

For a query, when you enter criteria for a prompt, you enter it like the following...
   ([Enter date])

I want to be able to format the input box in the same manner so it looks like my attachment.

Any assistance would be greatly appreciated.
Sample.jpg
0
Comment
Question by:Senniger1
4 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 1200 total points
ID: 38775372
You can't format a querys input box.  For that kind of flexibility,  create a seperate form and refer to it in  the criteria of the field in question like this:

Forms!yourformnam!yourtextbox
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 800 total points
ID: 38775384
You cannot alter the built-in prompt.
To do whatyou are asking you would have to design your own pop-up form and then modify the sql of the query to incorporate the user input.

It is simpler to ask users to enter parameter values in a standard form and then set the query parameters to point to the control(s) on the form using syntax like...

Forms!formname!controlname
0
 
LVL 13

Expert Comment

by:Shanan212
ID: 38775447
Dim dDate as date

dDate =  Application.InputBox(Prompt:="Please enter date:", Title:="Enter date", Default:="##/##/####")

Open in new window


Try above
0
 

Author Closing Comment

by:Senniger1
ID: 38775479
Thank you for the confirmation.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

772 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