Solved

Format input box for query prompt

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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…
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…

623 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