Solved

Format input box for query prompt

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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…

770 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