Solved

Format input box for query prompt

Posted on 2013-01-14
4
1,152 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 300 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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