Prompt from query - adding text

T

Traci

Is there a way to add additional text to the prompt window that is created
off of a query (aside from the [Question you enter in the criteria?]).

I have a button on a form that when clicked, prompts the user for criteria
(i.e. Enter category). For convenience, I would like to add a text box under
the entry field that lists the valid values the user can enter.

Is this doable?
 
R

Roger Carlson

No, not in a query parameter. The only thing you can do is create a small
form that has a combo box with the appropriate values and a button to
execute the query. Then reference the control on the form in the query. On
my website (www.rogersaccesslibrary.com), is a small Access database sample
called "ParaQuerySelect.mdb" which illustrates how to do this.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
D

Douglas J Steele

Consider creating a form that has, say, a combo box or list box that
contains the valid values, and refer to that control, rather than prompted
the user for input.

You'd refer to the control on the form by putting
Forms!NameOfForm!NameOfControl rather than [Question you enter in the
criteria?]

You could launch the query through code in the Click event of a button.
 
T

Traci

Does this work for reports? I've done this exactly as you've stated for my
queries, but I've got separate buttons for running reports. Right now, I'm
launching a report based on a query via a macro. I thought that the report
was launching the query. Will referencing the control like you do for
straight queries resolve for the report as well?

Does this makes sense? I don't think I'm explaining this very well.

Roger Carlson said:
No, not in a query parameter. The only thing you can do is create a small
form that has a combo box with the appropriate values and a button to
execute the query. Then reference the control on the form in the query. On
my website (www.rogersaccesslibrary.com), is a small Access database sample
called "ParaQuerySelect.mdb" which illustrates how to do this.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Traci said:
Is there a way to add additional text to the prompt window that is created
off of a query (aside from the [Question you enter in the criteria?]).

I have a button on a form that when clicked, prompts the user for criteria
(i.e. Enter category). For convenience, I would like to add a text box under
the entry field that lists the valid values the user can enter.

Is this doable?
 
R

Roger Carlson

Have the query that is the basis for the report reference your form, but
have the form run the Report instead of opening the query.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Traci said:
Does this work for reports? I've done this exactly as you've stated for my
queries, but I've got separate buttons for running reports. Right now, I'm
launching a report based on a query via a macro. I thought that the report
was launching the query. Will referencing the control like you do for
straight queries resolve for the report as well?

Does this makes sense? I don't think I'm explaining this very well.

Roger Carlson said:
No, not in a query parameter. The only thing you can do is create a small
form that has a combo box with the appropriate values and a button to
execute the query. Then reference the control on the form in the query. On
my website (www.rogersaccesslibrary.com), is a small Access database sample
called "ParaQuerySelect.mdb" which illustrates how to do this.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Traci said:
Is there a way to add additional text to the prompt window that is created
off of a query (aside from the [Question you enter in the criteria?]).

I have a button on a form that when clicked, prompts the user for criteria
(i.e. Enter category). For convenience, I would like to add a text
box
under
the entry field that lists the valid values the user can enter.

Is this doable?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top