Solved

Format input box for query prompt

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now